Qt & Linux fail to build UI widgets
-
wrote on 12 Feb 2022, 21:13 last edited by Dariusz 2 Dec 2022, 21:15
Hey
I'm on centos 9
Qt 6.2.3My 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
-
Show you contents of 'myUiTest' source dir
-
Show you contents of 'myUiTest' source dir
wrote on 13 Feb 2022, 10:15 last edited by Dariusz@Christian-Ehrlicher
Its something likesMyClassController.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.
-
Lifetime Qt Championwrote on 13 Feb 2022, 10:31 last edited by Christian Ehrlicher
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. -
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.wrote on 13 Feb 2022, 10:35 last edited by Dariusz@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. -
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)
1/6