So I'm making an app in PyQt5, which has a dialog. But the dialog is looking really glitchy when run with pyuic.
Here's a video of what's going on: https://youtu.be/3oJ7EMiJxO0 As you can see, the dialog shows fine with the "preview" function, but when I run it with python and pyuic, the labels and dropdowns are unusably glitchy. The button seems to work fine though...
I'm running Fedora 23 Workstation with GNOME 3, and Python 2.7.
Here's the contents of my .ui file...
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author>David Teresi</author>
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>258</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>backflip Settings</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>-90</x>
<y>260</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="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>241</width>
<height>261</height>
</rect>
</property>
<property name="title">
<string>backflip Settings</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>155</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="UpdateEveryLabel">
<property name="text">
<string>Update every</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="UpdateEverySelect">
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<item>
<property name="text">
<string>Day</string>
</property>
</item>
<item>
<property name="text">
<string>Week</string>
</property>
</item>
<item>
<property name="text">
<string>Hour</string>
</property>
</item>
<item>
<property name="text">
<string>Minute</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="RefreshButton">
<property name="geometry">
<rect>
<x>10</x>
<y>230</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Refresh</string>
</property>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>109</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="ThemeLabel">
<property name="text">
<string>Theme</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="ThemeSelect">
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Buildings</string>
</property>
</item>
<item>
<property name="text">
<string>Food</string>
</property>
</item>
<item>
<property name="text">
<string>Nature</string>
</property>
</item>
<item>
<property name="text">
<string>Technology</string>
</property>
</item>
<item>
<property name="text">
<string>People</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</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>
Could someone help me with this?
I can see from you Designer file that neither your QDialog
or QGroupBox
have a layout assigned. They should be using QVBoxLayout
's. You probably need to add some Vertical spacers as well.