Jaidyn Ann
1704d392e8
This small example demonstrates defining and binding to your own subclass of a QT widget.
62 lines
1.2 KiB
XML
62 lines
1.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>Form</class>
|
|
<widget class="QWidget" name="Form">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>295</width>
|
|
<height>144</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string/>
|
|
</property>
|
|
<widget class="QLabel" name="label">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>40</x>
|
|
<y>30</y>
|
|
<width>201</width>
|
|
<height>31</height>
|
|
</rect>
|
|
</property>
|
|
<property name="font">
|
|
<font>
|
|
<pointsize>15</pointsize>
|
|
<bold>true</bold>
|
|
</font>
|
|
</property>
|
|
<property name="text">
|
|
<string>Adieu, monsieur!</string>
|
|
</property>
|
|
<property name="alignment">
|
|
<set>Qt::AlignCenter</set>
|
|
</property>
|
|
</widget>
|
|
<widget class="OurButton" name="goodbyeButton">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>180</x>
|
|
<y>90</y>
|
|
<width>75</width>
|
|
<height>31</height>
|
|
</rect>
|
|
</property>
|
|
<property name="text">
|
|
<string>Quit</string>
|
|
</property>
|
|
</widget>
|
|
</widget>
|
|
<customwidgets>
|
|
<customwidget>
|
|
<class>OurButton</class>
|
|
<extends>QPushButton</extends>
|
|
<header>custom_widget.h</header>
|
|
</customwidget>
|
|
</customwidgets>
|
|
<resources/>
|
|
<connections/>
|
|
</ui>
|