[PyQt] Learning Qt5 designer

Rich Shepard rshepard at appl-ecosys.com
Fri Dec 30 23:35:24 GMT 2016


On Sat, 31 Dec 2016, Hans-Peter Jansen wrote:

> You can undo your changes, as long as designer is still running.

Pete,

   Yes, I saw that under the Edit menu.

> Have you tried the other layout variant grid and form?

   Not yet. I'm very familiar with wxPython and trying to translate that
knowledge to Qt5. I've read that I should work from the back (frame, tabbed
window) forward, but that didn't work for me so I am trying to create the
main data entry (add/modify/delete) dialogs written and configured then
learn how to place them on tabs.

   I'm open to learning Qt5 as quickly as I can.

> Post your ui file, please..

   Attached.

Thanks,

Rich
-------------- next part --------------
<?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>694</width>
    <height>331</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Company</string>
  </property>
  <property name="whatsThis">
   <string>Company</string>
  </property>
  <widget class="QDialogButtonBox" name="buttonBox">
   <property name="geometry">
    <rect>
     <x>340</x>
     <y>290</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 class="QWidget" name="">
   <property name="geometry">
    <rect>
     <x>10</x>
     <y>10</y>
     <width>661</width>
     <height>41</height>
    </rect>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout">
    <item>
     <widget class="QLabel" name="label_10">
      <property name="text">
       <string>Industry</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_10</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_10"/>
    </item>
    <item>
     <spacer name="horizontalSpacer">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>40</width>
        <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
    <item>
     <widget class="QLabel" name="label_11">
      <property name="text">
       <string>Status</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_11</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_11"/>
    </item>
   </layout>
  </widget>
  <widget class="QWidget" name="">
   <property name="geometry">
    <rect>
     <x>10</x>
     <y>60</y>
     <width>661</width>
     <height>31</height>
    </rect>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout_2">
    <item>
     <widget class="QLabel" name="label">
      <property name="text">
       <string>Name</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit"/>
    </item>
   </layout>
  </widget>
  <widget class="QWidget" name="">
   <property name="geometry">
    <rect>
     <x>10</x>
     <y>100</y>
     <width>661</width>
     <height>31</height>
    </rect>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout_3">
    <item>
     <widget class="QLabel" name="label_2">
      <property name="text">
       <string>Address 1</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_2</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_2"/>
    </item>
   </layout>
  </widget>
  <widget class="QWidget" name="">
   <property name="geometry">
    <rect>
     <x>10</x>
     <y>140</y>
     <width>661</width>
     <height>41</height>
    </rect>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout_4">
    <item>
     <widget class="QLabel" name="label_3">
      <property name="text">
       <string>Address 2</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_3</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_3"/>
    </item>
   </layout>
  </widget>
  <widget class="QWidget" name="">
   <property name="geometry">
    <rect>
     <x>10</x>
     <y>190</y>
     <width>661</width>
     <height>41</height>
    </rect>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout_5">
    <item>
     <widget class="QLabel" name="label_4">
      <property name="text">
       <string>City</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_4</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_4"/>
    </item>
    <item>
     <spacer name="horizontalSpacer_4">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>40</width>
        <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
    <item>
     <spacer name="horizontalSpacer_3">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>40</width>
        <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
    <item>
     <widget class="QLabel" name="label_5">
      <property name="text">
       <string>State</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_5</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_5"/>
    </item>
    <item>
     <widget class="QLabel" name="label_6">
      <property name="text">
       <string>Post Code</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_6</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_6"/>
    </item>
    <item>
     <widget class="QLabel" name="label_7">
      <property name="text">
       <string>Country</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_7</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_7"/>
    </item>
   </layout>
   <zorder>plainTextEdit_5</zorder>
   <zorder>horizontalSpacer_3</zorder>
   <zorder>horizontalSpacer_4</zorder>
  </widget>
  <widget class="QWidget" name="">
   <property name="geometry">
    <rect>
     <x>10</x>
     <y>240</y>
     <width>661</width>
     <height>51</height>
    </rect>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout_6">
    <item>
     <widget class="QLabel" name="label_8">
      <property name="text">
       <string>Phone</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_8</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_8"/>
    </item>
    <item>
     <spacer name="horizontalSpacer_2">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>40</width>
        <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
    <item>
     <widget class="QLabel" name="label_9">
      <property name="text">
       <string>URL</string>
      </property>
      <property name="buddy">
       <cstring>plainTextEdit_9</cstring>
      </property>
     </widget>
    </item>
    <item>
     <widget class="QPlainTextEdit" name="plainTextEdit_9"/>
    </item>
   </layout>
  </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>


More information about the PyQt mailing list