Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. UIC doesn’t use the object name to create UI_MyClass.h
Forum Updated to NodeBB v4.3 + New Features

UIC doesn’t use the object name to create UI_MyClass.h

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
13 Posts 2 Posters 1.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.
  • CP71C CP71

    @Christian-Ehrlicher
    Hi,
    Thank you so much for your response.
    Yes, I created the user interface in my post using QtCreator 12.0.1 and processed it with UIC 4.8.7.

    But I have encountered this issue on UIs created with Qt 3.2.1 and normally processed by UIC 4.8.7.

    I created the same simple widget in both QtCreator and compared them and they are identical .

    Christian EhrlicherC Offline
    Christian EhrlicherC Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by Christian Ehrlicher
    #4

    @CP71 Then uic from Qt4 can't handle object names or has a bug.
    But I think you did something wrong in your test. A ui file from Qt3 sets the name of an object as <property name="name" >... Don't know what Qt4 does though.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    CP71C 1 Reply Last reply
    1
    • Christian EhrlicherC Christian Ehrlicher

      @CP71 Then uic from Qt4 can't handle object names or has a bug.
      But I think you did something wrong in your test. A ui file from Qt3 sets the name of an object as <property name="name" >... Don't know what Qt4 does though.

      CP71C Offline
      CP71C Offline
      CP71
      wrote on last edited by
      #5

      @Christian-Ehrlicher

      Then uic from Qt4 can't handle object names or has a bug.
      

      Yeah, at least it looks that way.
      I will try to investigate, if I find the way, I will update you.

      Now I have only one idea:
      I cross compiled the Qt 4.8.7 x86 on my Linux 64 bit, maybe something went wrong, is it possible?
      But I sound it very strange

      But I think you did something wrong in your test. A ui file from Qt3 sets the name of an object as <property name="name" >... Don't know what Qt4 does though.
      

      I think you are right, but I don’t know what is wrong.

      Below you can see the UI created by QtCreator 3.2.1 and normally processed in my VM with Linux 32 and Qt 4.8.7 32 bit.
      But not processed in my Linux 64 bit with Qt 4.8.7 32 bit.

      <?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>200</width>
          <height>200</height>
         </rect>
        </property>
        <property name="windowTitle">
         <string>Form</string>
        </property>
        <widget class="QPushButton" name="pushButtonMy">
         <property name="geometry">
          <rect>
           <x>30</x>
           <y>20</y>
           <width>100</width>
           <height>30</height>
          </rect>
         </property>
         <property name="text">
          <string>PushButton</string>
         </property>
        </widget>
       </widget>
       <resources/>
       <connections/>
      </ui>
      

      @Christian-Ehrlicher Thank you very much for your time!

      Christian EhrlicherC 1 Reply Last reply
      0
      • CP71C CP71

        @Christian-Ehrlicher

        Then uic from Qt4 can't handle object names or has a bug.
        

        Yeah, at least it looks that way.
        I will try to investigate, if I find the way, I will update you.

        Now I have only one idea:
        I cross compiled the Qt 4.8.7 x86 on my Linux 64 bit, maybe something went wrong, is it possible?
        But I sound it very strange

        But I think you did something wrong in your test. A ui file from Qt3 sets the name of an object as <property name="name" >... Don't know what Qt4 does though.
        

        I think you are right, but I don’t know what is wrong.

        Below you can see the UI created by QtCreator 3.2.1 and normally processed in my VM with Linux 32 and Qt 4.8.7 32 bit.
        But not processed in my Linux 64 bit with Qt 4.8.7 32 bit.

        <?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>200</width>
            <height>200</height>
           </rect>
          </property>
          <property name="windowTitle">
           <string>Form</string>
          </property>
          <widget class="QPushButton" name="pushButtonMy">
           <property name="geometry">
            <rect>
             <x>30</x>
             <y>20</y>
             <width>100</width>
             <height>30</height>
            </rect>
           </property>
           <property name="text">
            <string>PushButton</string>
           </property>
          </widget>
         </widget>
         <resources/>
         <connections/>
        </ui>
        

        @Christian-Ehrlicher Thank you very much for your time!

        Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #6

        Are you sure your QtCreator 3.2.1 is built with Qt4?

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        CP71C 1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          Are you sure your QtCreator 3.2.1 is built with Qt4?

          CP71C Offline
          CP71C Offline
          CP71
          wrote on last edited by
          #7

          @Christian-Ehrlicher
          Yes, I confirm.
          In my VM I have QtCreator 3.2.1 (Based 5.3.2 GCC 4.9.2) with Qt 4.8.7 32 bit.

          It works well, I didn't see issues.

          Only for curiosity, do you see something of strange in this configuration?

          Christian EhrlicherC 1 Reply Last reply
          0
          • CP71C CP71

            @Christian-Ehrlicher
            Yes, I confirm.
            In my VM I have QtCreator 3.2.1 (Based 5.3.2 GCC 4.9.2) with Qt 4.8.7 32 bit.

            It works well, I didn't see issues.

            Only for curiosity, do you see something of strange in this configuration?

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #8

            @CP71 You show clearly that QtCreator is built with Qt5. Create your ui files with a Qt4 based designer.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            CP71C 1 Reply Last reply
            1
            • Christian EhrlicherC Christian Ehrlicher

              @CP71 You show clearly that QtCreator is built with Qt5. Create your ui files with a Qt4 based designer.

              CP71C Offline
              CP71C Offline
              CP71
              wrote on last edited by
              #9

              @Christian-Ehrlicher
              Excuse my English :(, but I believe I didn't understand the purpose of this sentence..
              Do you think this configuration is a problem?

              Christian EhrlicherC 1 Reply Last reply
              0
              • CP71C CP71

                @Christian-Ehrlicher
                Excuse my English :(, but I believe I didn't understand the purpose of this sentence..
                Do you think this configuration is a problem?

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #10

                If you want a ui file which works with uic from Qt4 you must use a designer from Qt4 and not one from Qt5 or Qt6 as they produce a xml file which can not be properly parsed with the ancient Qt4 uic. I already told you this in my first post here.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                CP71C 1 Reply Last reply
                2
                • Christian EhrlicherC Christian Ehrlicher

                  If you want a ui file which works with uic from Qt4 you must use a designer from Qt4 and not one from Qt5 or Qt6 as they produce a xml file which can not be properly parsed with the ancient Qt4 uic. I already told you this in my first post here.

                  CP71C Offline
                  CP71C Offline
                  CP71
                  wrote on last edited by
                  #11

                  @Christian-Ehrlicher
                  I understand, but then I don't understand how I didn't notice UI issues until now.

                  If I understand correctly, I am using a Qt5 design (QtCreator) with incompatible UIC (Qt4) without ever encountering any issues, how is that possible?

                  "Anyway, thanks for the info, I'll proceed to downgrade QtCreator based on Qt4

                  Christian EhrlicherC 1 Reply Last reply
                  0
                  • CP71C CP71

                    @Christian-Ehrlicher
                    I understand, but then I don't understand how I didn't notice UI issues until now.

                    If I understand correctly, I am using a Qt5 design (QtCreator) with incompatible UIC (Qt4) without ever encountering any issues, how is that possible?

                    "Anyway, thanks for the info, I'll proceed to downgrade QtCreator based on Qt4

                    Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    There is no need to downgrade QtCreator. Just edit your ui files with the correct designer executable instead inside QtCreator.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    CP71C 1 Reply Last reply
                    1
                    • Christian EhrlicherC Christian Ehrlicher

                      There is no need to downgrade QtCreator. Just edit your ui files with the correct designer executable instead inside QtCreator.

                      CP71C Offline
                      CP71C Offline
                      CP71
                      wrote on last edited by
                      #13

                      @Christian-Ehrlicher
                      Thank you, I like it better this way. ;)

                      Just out of curiosity, do you have any idea why I've never seen any UI issues in the VM?

                      1 Reply Last reply
                      0
                      • CP71C CP71 has marked this topic as solved on

                      • Login

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