Qt designer freezes after opening dialog [SOLVED]
-
Hello,
I am developing software using Qt under Centos 5.5 on a virtual machine. The problem is that I have two dialog UI forms which I cannot modify. Qt designer freezes after I open them - I mean I cannot modify any of the widgets in the form, neither close the Designer's window. I have to use kill command to get rid of it.
The problem is occurring also for the other users on the same machine and rebooting system does not help either. Used qt version is 4.2.1.
Please, help find a solution to the problem - I am blocked with the development because of this issue. Thank you in advance.
Best regards,
Rafal -
The UI files are xml files.
try to open them with xml viewer to see if the xml is valid.Also if you are just using std widget you could post the offending content of the file here so we might have a shot
of finding out what is wrong. -
Thanks, I forgot to write that the problem does not occur while opening MainWindow UI - it is only for Dialog UIs. Here is the code of one of them
<ui version="4.0" > <class>CreateExecutionDialog</class> <widget class="QDialog" name="CreateExecutionDialog" > <property name="windowModality" > <enum>Qt::ApplicationModal</enum> </property> <property name="geometry" > <rect> <x>0</x> <y>0</y> <width>433</width> <height>245</height> </rect> </property> <property name="windowTitle" > <string>Execution Item</string> </property> <widget class="QLabel" name="label" > <property name="geometry" > <rect> <x>30</x> <y>10</y> <width>61</width> <height>17</height> </rect> </property> <property name="text" > <string>Task table</string> </property> </widget> <widget class="QLabel" name="label_2" > <property name="geometry" > <rect> <x>30</x> <y>130</y> <width>61</width> <height>17</height> </rect> </property> <property name="text" > <string>Start time</string> </property> </widget> <widget class="QLabel" name="label_4" > <property name="geometry" > <rect> <x>220</x> <y>130</y> <width>71</width> <height>17</height> </rect> </property> <property name="text" > <string>End time</string> </property> </widget> <widget class="QLabel" name="label_5" > <property name="geometry" > <rect> <x>30</x> <y>70</y> <width>104</width> <height>17</height> </rect> </property> <property name="text" > <string>Archive directory</string> </property> </widget> <widget class="QDateTimeEdit" name="startTimeEdit" > <property name="geometry" > <rect> <x>20</x> <y>150</y> <width>191</width> <height>29</height> </rect> </property> <property name="dateTime" > <datetime> <hour>0</hour> <minute>0</minute> <second>0</second> <year>2000</year> <month>1</month> <day>1</day> </datetime> </property> <property name="displayFormat" > <string>yyyy-MM-dd hh:mm:ss.zzz</string> </property> </widget> <widget class="QLineEdit" name="archiveDirectoryEdit" > <property name="geometry" > <rect> <x>20</x> <y>90</y> <width>271</width> <height>29</height> </rect> </property> </widget> <widget class="QDateTimeEdit" name="endTimeEdit" > <property name="geometry" > <rect> <x>220</x> <y>150</y> <width>191</width> <height>29</height> </rect> </property> <property name="displayFormat" > <string>yyyy-MM-dd hh:mm:ss.zzz</string> </property> </widget> <widget class="QPushButton" name="browseArchiveDirectoryButton" > <property name="geometry" > <rect> <x>310</x> <y>90</y> <width>101</width> <height>27</height> </rect> </property> <property name="text" > <string>Browse ...</string> </property> </widget> <widget class="QLineEdit" name="lineEdit" > <property name="enabled" > <bool>false</bool> </property> <property name="geometry" > <rect> <x>20</x> <y>30</y> <width>391</width> <height>29</height> </rect> </property> <property name="readOnly" > <bool>true</bool> </property> </widget> <widget class="QDialogButtonBox" name="buttonBox" > <property name="geometry" > <rect> <x>70</x> <y>190</y> <width>341</width> <height>32</height> </rect> </property> <property name="orientation" > <enum>Qt::Horizontal</enum> </property> <property name="standardButtons" > <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set> </property> <property name="centerButtons" > <bool>false</bool> </property> </widget> </widget> <resources/> <connections> <connection> <sender>buttonBox</sender> <signal>accepted()</signal> <receiver>CreateExecutionDialog</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>CreateExecutionDialog</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>
I checked it using XML validator and the file is ok.
-
Hi
I added a new UI file and pasted your xml into it.Open fine here. ?!
I see
Task Table
Archive Directory with Browse button
and start end time.
ok cancelCould you try to add a new UI file and paste the xmp to it ?
Just to see if that makes any difference. -
Thanks, I have tried copying it to the new .ui file, but behavior is the same.
-
@predejtor
Hmm it must be something with QT Creator
itself or support libraries.Maybe you could clone your virtual machine and install/reinstall QT just to check if something is wrong.
I will try to paste into a ubuntu Qt Creator just to check if linux version is happy with your file too.
update:
Opens file fine in qt 5.5 on ubuntu. -
@predejtor
Well it seems to be a problem with QT Creator since the xml file seems valid and can be loaded in both win and linux.
So I assume something wrong with the Creator installation.
I am not aware of any config that would affect the reading of UI files as it is
a integrated part of Creator.Would it be possible for you to create a snapshot of the WM and then reinstall qt?
-
I have to ask administrators of the VM if it is possible. Many thanks for your time.
-
@predejtor
It is possible to install qt with no root access
http://www.qtcentre.org/threads/23225-Installing-Qt-without-root-privileges
You could install a new qt to a new folder in /home and run it from there but to be on the safe side,
it is best to have a backup of what you have now.One question.
If you make a new UI file and then insert control to it, it will also start to crash Creator ? -
@predejtor
Just strange that the same xml works fine here.
But I guess if you can just recreate the dialogs and it works, it a fix. -
I have found what was the real problem. This issue occurred only on Dialog windows. I set for them 'modality' - ApplicationModal and that was the problem I was looking for. After removing this property from xml file everything is fine.
It seems to be a bug. -
@predejtor
Nice found!Not sure where in the shown xml this is ?
remember to flag as solved :)
-
After removing property "windowModality" freeze is not occurring again
<ui version="4.0" > <class>CreateExecutionDialog</class> <widget class="QDialog" name="CreateExecutionDialog" > <property name="windowModality" > <enum>Qt::ApplicationModal</enum> </property> <property name="geometry" > ...
System: CentOS 5.5
QT version: 4.2.1 -
@predejtor said:
Ahh that way. Thank you.