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 & Linux fail to build UI widgets

Qt & Linux fail to build UI widgets

Scheduled Pinned Locked Moved Unsolved General and Desktop
linux
6 Posts 2 Posters 662 Views
  • 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 12 Feb 2022, 21:13 last edited by Dariusz 2 Dec 2022, 21:15
    #1

    Hey

    I'm on centos 9
    Qt 6.2.3

    My autoUI thini seems to not work... I was wondering if any1 has experienced it before...

    AutoUic error
    -------------
    "SRC:/myUiTest/myUiGUI.cpp"
    includes the uic file "ui_myUiGUI.h",
    but the user interface file "myUiGUI.ui"
    could not be found in the following directories
      "SRC:/myUiTest"
    

    I'm a tad puzzled by it, as the ui is definitely in that folder. I'm using glob to collect all my ui/qrc/src/h etc. So maybe the order in which these files are being collected/passed to Qt are the issue? I've tried changing the order so its CPP then H then QRC then UI as well as > https://doc.qt.io/qt-5/qtwidgets-cmake-qt-wrap-ui.html

    They all seem to error... any idea?

    A simple Hello world app work.
    The above code crashes when I try to build shared plugin with ui.

    TIA

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 13 Feb 2022, 08:45 last edited by
      #2

      Show you contents of 'myUiTest' source dir

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

      D 1 Reply Last reply 13 Feb 2022, 10:15
      0
      • C Christian Ehrlicher
        13 Feb 2022, 08:45

        Show you contents of 'myUiTest' source dir

        D Offline
        D Offline
        Dariusz
        wrote on 13 Feb 2022, 10:15 last edited by Dariusz
        #3

        @Christian-Ehrlicher
        Its something like

        sMyClassController.h
        sMyClassController.cpp
        sMyClassControllerGUI.h
        sMyClassControllerGUI.cpp
        sMyClassControllerGUI.ui
        sMyClassXController.h
        sMyClassXController.cpp
        sMyClassXControllerGUI.h
        sMyClassXControllerGUI.cpp
        sMyClassXControllerGUI.ui
        sMyClassKController.h
        sMyClassKController.cpp
        sMyClassKControllerGUI.h
        sMyClassKControllerGUI.cpp
        sMyClasskControllerGUI.ui
        myUi.h
        myUi.cpp
        myUiGUI.h
        myUiGUI.cpp
        myUiGUI.ui
        

        There is like 50+ files in that folder with ui/GUI suffixes.
        Etc etc, I've dig out that at some point cmake was not able to find the header/ui files due to capital letters/etc. But that seems to be fixed and https://doc.qt.io/qt-5/qtwidgets-cmake-qt-wrap-ui.html was meant to help fix it.
        One thing I noticed that even to Clion can see all my targets. QtCreator does not! It actually does not see one of targets that he needs to build that generates those errors. I wonder if thats the problem somehow. Ripping the project apart now & trying to find out what is it.

        I've learned so far that on linux even the order in which I include static and sharted libraries matter so who knows.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 13 Feb 2022, 10:31 last edited by Christian Ehrlicher
          #4

          And where is myUiGUI.ui ? Don't see it. Please do a ls -l myUiGUI*
          Not finding a ui file has nothing to do with QtCreator or CLion. Remove CMakeLists.txt.user to re-create the QtCreators config for the project.

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

          D 1 Reply Last reply 13 Feb 2022, 10:35
          0
          • C Christian Ehrlicher
            13 Feb 2022, 10:31

            And where is myUiGUI.ui ? Don't see it. Please do a ls -l myUiGUI*
            Not finding a ui file has nothing to do with QtCreator or CLion. Remove CMakeLists.txt.user to re-create the QtCreators config for the project.

            D Offline
            D Offline
            Dariusz
            wrote on 13 Feb 2022, 10:35 last edited by Dariusz
            #5

            @Christian-Ehrlicher I've updated the post above.
            Yea tried resetting it all/deleting build folder. Still debugging it. Odd bananas on linux.
            They are all in 1 folder.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 13 Feb 2022, 10:40 last edited by
              #6

              And does qt_wrap_ui(SOURCES myUiGUI.ui) work (when SOURCES is your variable for your target, otherwise adjust it - please post your CMakeLists.txt)

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

              1 Reply Last reply
              0

              1/6

              12 Feb 2022, 21:13

              • Login

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