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. New UI widgets elements inaccessible to code model
Qt 6.11 is out! See what's new in the release blog

New UI widgets elements inaccessible to code model

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
25 Posts 5 Posters 16.6k Views 1 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.
  • ThirdStrandT Offline
    ThirdStrandT Offline
    ThirdStrand
    wrote on last edited by
    #16

    @Christian-Ehrlicher Thanks for moving this topic around in attempts to get visibility. Much appreciated.

    1 Reply Last reply
    0
    • ThirdStrandT Offline
      ThirdStrandT Offline
      ThirdStrand
      wrote on last edited by
      #17

      For the record as no noise here yet:

      https://bugreports.qt.io/browse/QTCREATORBUG-29465

      JonBJ 1 Reply Last reply
      0
      • ThirdStrandT ThirdStrand

        For the record as no noise here yet:

        https://bugreports.qt.io/browse/QTCREATORBUG-29465

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #18

        @ThirdStrand Have you noticed it is marked "Duplicate" of https://bugreports.qt.io/browse/QTCREATORBUG-28787 ?

        1 Reply Last reply
        0
        • ThirdStrandT Offline
          ThirdStrandT Offline
          ThirdStrand
          wrote on last edited by
          #19

          and ::

          https://bugreports.qt.io/browse/QTCREATORBUG-28787

          appears to have been reported this past February.

          1 Reply Last reply
          0
          • cristian-adamC Offline
            cristian-adamC Offline
            cristian-adam
            wrote on last edited by
            #20

            The CMake project using AUTOUIC set to ON do not work.

            But if you don't use AUTOUIC it works as expected.

            I've changed a hello-widgets-cmake project like this:

            #set(CMAKE_AUTOUIC ON)
            
            qt_wrap_ui(UI_SRC mainwindow.ui)
            
            set(PROJECT_SOURCES
                    main.cpp
                    mainwindow.cpp
                    mainwindow.h
                    ${UI_SRC}
            )
            target_include_directories(hello-widgets-cmake PRIVATE ${CMAKE_BINARY_DIR})
            

            And got it working for me.

            ThirdStrandT 1 Reply Last reply
            0
            • cristian-adamC cristian-adam

              The CMake project using AUTOUIC set to ON do not work.

              But if you don't use AUTOUIC it works as expected.

              I've changed a hello-widgets-cmake project like this:

              #set(CMAKE_AUTOUIC ON)
              
              qt_wrap_ui(UI_SRC mainwindow.ui)
              
              set(PROJECT_SOURCES
                      main.cpp
                      mainwindow.cpp
                      mainwindow.h
                      ${UI_SRC}
              )
              target_include_directories(hello-widgets-cmake PRIVATE ${CMAKE_BINARY_DIR})
              

              And got it working for me.

              ThirdStrandT Offline
              ThirdStrandT Offline
              ThirdStrand
              wrote on last edited by
              #21

              @cristian-adam Thank you for the follow-up. I was reading about this old way yesterday, but I was not sure if it would make any difference.

              Noting that CMake mark that generic command "qt_wrap_ui" as deprecated.

              One should use qt6_wrap_ui which is supposedly provided by the Qt installation of CMake. (or the qt5 variant as required)

              I will experiment with this in the meantime, and it appears promising!, while waiting for an official word from the Bug Report. If AUTOUIC is not terribly useful in it's current state, I am in hopes that it will be "fixed" to do what this manual qt6_wrap_ui accomplishes.

              1 Reply Last reply
              0
              • ThirdStrandT Offline
                ThirdStrandT Offline
                ThirdStrand
                wrote on last edited by
                #22

                Confirming changing to the qt6_wrap_ui method seems to work "normally". The bug under which mine was closed as a duplicate shows Fixed on the Kanban board, so looking forward to finding out soon.

                cristian-adamC 1 Reply Last reply
                0
                • ThirdStrandT ThirdStrand has marked this topic as solved on
                • ThirdStrandT ThirdStrand

                  Confirming changing to the qt6_wrap_ui method seems to work "normally". The bug under which mine was closed as a duplicate shows Fixed on the Kanban board, so looking forward to finding out soon.

                  cristian-adamC Offline
                  cristian-adamC Offline
                  cristian-adam
                  wrote on last edited by
                  #23

                  The bug is fixed. You could get binaries from https://github.com/qt-creator/qt-creator/actions/runs/5763934496 when the job is done.

                  Or wait until the fix landed in https://download.qt.io/snapshots/qtcreator/11.0/

                  1 Reply Last reply
                  0
                  • ThirdStrandT Offline
                    ThirdStrandT Offline
                    ThirdStrand
                    wrote on last edited by
                    #24

                    Additional note:

                    I built a new CMake file (using a file from another project and editing it) for an existing qmake project and attempted to build it. All components built until it got to building the UI. For some unknown reason, the resulting "ui_mainwindows.h" file, which is in it's normal place in the build folder was not found by CMake.

                    I changed CMake to turning on AUTOUIC and it built properly. Then changed it back to the qt6_wrap_ui method and it continues to build properly.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mohammad Kanan
                      wrote last edited by
                      #25

                      I had a similar problem , It was fixed only by deleting build folder and rebuilding again

                      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