Qt Designerを立ちあげてみる その2
「Dialog with Buttons Bottom」を選んで、「作成」を押しました。このウィンドウは「ファイル(File)」メニューから「新規(New)」を選んでも表示できます。

Window Titleとかデフォルトのサイズとかは後でどうにでもなりそうです。これをベースに部品をベタベタ貼っていけばよさそうです。
画面の部品は、左にある「ウィジェットボックス」というところにあります。この部品を上記のダイアログにドラッグ&ドロップすればよいのでしょうね。


なにか面白そうな部品があるでしょうか?よく見る部品は大抵揃っていそうです。
設定ダイアログでよくあるタブは「Tab Widget」を配置すれば良さそうです。さて、どういう風にドラッグ&ドロップしていけばいいのでしょうね。
とりあえず、それは明日にして、一旦終了します。多分保存するのですよね。
保存せずに終了しようとすると、「名前をつけてフォームを保存」というダイアログが出ます。適当な場所に保存します。本番ではないので、どこでもいいですね。"setting_dialog.ui"という名前で保存しました。これで明日再開できます。
参考のために、上記ファイルの内容を見てみます。いろいろ書いてありますが、それっぽい情報かなという想像がつきそうですね。
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>30</x>
<y>240</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
« Qt Designerを立ちあげてみる | トップページ | Qt5.3に付属のMinGW-4.8.2は64bit対応したものでした… »
この記事へのコメントは終了しました。
« Qt Designerを立ちあげてみる | トップページ | Qt5.3に付属のMinGW-4.8.2は64bit対応したものでした… »

コメント