Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt designer freezes after opening dialog [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

Qt designer freezes after opening dialog [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
designerfreezeqdialogmodal dialog
16 Posts 2 Posters 8.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #2

    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.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      deleted331
      wrote on last edited by
      #3

      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.

      mrjjM 1 Reply Last reply
      0
      • D deleted331

        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.

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #4

        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 cancel

        Could you try to add a new UI file and paste the xmp to it ?
        Just to see if that makes any difference.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          deleted331
          wrote on last edited by
          #5

          Thanks, I have tried copying it to the new .ui file, but behavior is the same.

          mrjjM 1 Reply Last reply
          0
          • D deleted331

            Thanks, I have tried copying it to the new .ui file, but behavior is the same.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #6

            @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.

            D 1 Reply Last reply
            0
            • mrjjM mrjj

              @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.

              D Offline
              D Offline
              deleted331
              wrote on last edited by
              #7

              @mrjj
              Thank you for investigation. It may be the problem with VM, but I am not the person who manages it. Can it be the problem with Qt Creator config? If yes, what files should I look for?

              mrjjM 1 Reply Last reply
              0
              • D deleted331

                @mrjj
                Thank you for investigation. It may be the problem with VM, but I am not the person who manages it. Can it be the problem with Qt Creator config? If yes, what files should I look for?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #8

                @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?

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  deleted331
                  wrote on last edited by
                  #9

                  I have to ask administrators of the VM if it is possible. Many thanks for your time.

                  mrjjM 1 Reply Last reply
                  0
                  • D deleted331

                    I have to ask administrators of the VM if it is possible. Many thanks for your time.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @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 ?

                    D 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @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 ?

                      D Offline
                      D Offline
                      deleted331
                      wrote on last edited by
                      #11

                      @mrjj
                      I created new UI form and could modify it without problems (eg. add buttons). However when I put the xml code from previous dialog freeze occurred again - so I suppose something is wrong with this form's nodes.

                      mrjjM 1 Reply Last reply
                      0
                      • D deleted331

                        @mrjj
                        I created new UI form and could modify it without problems (eg. add buttons). However when I put the xml code from previous dialog freeze occurred again - so I suppose something is wrong with this form's nodes.

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        @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.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          deleted331
                          wrote on last edited by
                          #13

                          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.

                          mrjjM 1 Reply Last reply
                          0
                          • D deleted331

                            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.

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            @predejtor
                            Nice found!

                            Not sure where in the shown xml this is ?

                            remember to flag as solved :)

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              deleted331
                              wrote on last edited by
                              #15

                              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

                              1 Reply Last reply
                              0
                              • mrjjM Offline
                                mrjjM Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on last edited by
                                #16

                                @predejtor said:

                                Ahh that way. Thank you.

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved