Unsolved When ever i add button or checkbox or anything in any UI file form it doesn't appear
-
and this also so i guess any changes in ui it doesn't but this was on linux before i go to windows so is there any package should i add
-
- Save your files
- Close Qt Creator
- Delete the folder
C:\Users\Mostafa\Downloads\HospitalSoftware Last Version\build-Hospital-ClinicSoftware-Desktop_Qt_5_15_1_MinGW_32_bit-Debug\
- Open Qt Creator and rebuild your project
-
HospitalSoftware Last Version
Please, please avoid project names with spaces or other special characters.
You will run into problems sooner or later. Maybe this one is already a result of that.
Regards
-
i did that just right now and still the same result
-
-
-
i chagned the name of folders and .pro file to names without spaces or special characters (however when it was running on linux it was fine but i thought maybe it the issue , i even moved the folder to another directory ) but the problem still exists any change in UI FORM doesn't work
-
Hi @MostafaEzzat,
ok, please make sure that no
ui_xxxx.h
files exist in your source folder (they should only be generated in the build folder).This is the most common reason for problems like yours.
Regards
-
@MostafaEzzat
You originally said "When ever i add button or checkbox or anything in any UI file form it doesn't appear", though I see there are at least a couple of buttons which do appear.That aside. I would think it's time you did some detective work yourself, to see where it's getting to/falling over.
-
Within Designer there is Tools > Form Editor > Preview. How does that look?
-
Have a look in the
.ui
file after saving (it's not read-only, is it?). Does that have your changes or not? If it has the ones you added, what is different about them compared against the couple I see which do work? -
If the changes are going into the
.ui
file, have a look in the code generated into theui_....h
file. Does that have code for the new items? Again, is the code different from the ones which do work?
Then at least we'll know where the problem actually is....
-
-
Hi,
i mean by whenever that all ui form files changes in this specific project doesn't appear but new projects it works fine
.ui file
it's not read only, Plus the new editing like adding button or whatever it added also in .ui file but it doesn't appear when i ran the softwareand this's
.ui file
code about new buttons which i added for the test<widget class="QPushButton" name="pushButton_2"> <property name="text"> <string>PushButton</string> </property> </widget> </item> <item> <widget class="QPushButton" name="pushButton_5"> <property name="text"> <string>PushButton</string> </property> </widget>
and this's the form editor it apears here but it doesn't apear after running and i check the folder files there is no such a file
ui_xxxx.h
Thanks for Responding
Regards -
Do you have multiple
*.ui
files in your project dir? Maybe you've created a backup of your design file and / or the wrong one is included in your.pro
. So that the one you edit, is not the one your program is loading...How does your pro file look and what files do you have in your directory?
-
@MostafaEzzat
First, do follow what @Pl45m4 has suggested.The
ui....h
files are generated during build (viauic
) from your.ui
into your build directory, where the*.obj
files go. If your.ui
file is getting updated there is something going astray during theuic
build phase.When you change the
.ui
file, have a look during the Build at what commands are being executed in the Compile Output window. If nothing then you have an issue! -
i do have multiple
.ui file
in the project but there is no dublicateui file
that have the same name
but i've multiple.pro files
and there are dublicate likeHospital-ClinicSoftware.pro.user.181918d.4.8-pre1 Hospital-ClinicSoftware.pro.user HospitalClinicSoftware.pro.user Hospital-ClinicSoftware HospitalClinicSoftware "**note this not .pro it's normal file have the same name**"
but i'm sorry i don't what's
uic build
exactly doing toui files
and i can't post Compile Output Result because it's more than 32000 characterthis my
.pro
file code#------------------------------------------------- # # Project created by QtCreator 2018-12-24T22:54:39 # #------------------------------------------------- # QT += core gui sql greaterThan(QT_MAJOR_VERSION, 4): QT += widgets designer TARGET = HospitalClinicSoftware TEMPLATE += app lib libs # The following define makes your compiler emit warnings if you use # any feature of Qt which has been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 CONFIG += c++11 plugins plugin designer SOURCES += \ main.cpp \ mainwindow.cpp \ mainprocess.cpp \ mysqldatabase.cpp \ showingdata.cpp \ delgate.cpp \ profile3.cpp \ profile.cpp \ multipagewidget.cpp \ multipagewidgetplugin.cpp \ multipagewidgetcontainerextension.cpp \ multipagewidgetextensionfactory.cpp \ mysqldatabase.cpp HEADERS += \ mainwindow.h \ mainprocess.h \ showingdata.h \ delgate.h \ profile3.h \ profile.h \ multipagewidget.h \ multipagewidgetplugin.h \ multipagewidgetcontainerextension.h \ multipagewidgetextensionfactory.h \ mysqldatabase.h FORMS += \ mainwindow.ui \ mainprocess.ui \ showingdata.ui \ profile3.ui \ profile.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path += /opt/$${TARGET}/bin $$[QT_INSTALL_PLUGINS]/designer !isEmpty(target.path): INSTALLS += target DISTFILES +=
Edit:
Thi's the part of
uic
in Compile Output16:47:08: Running steps for project HospitalClinicSoftware... 16:47:08: Starting: "D:\Qt\5.15.1\mingw81_32\bin\qmake.exe" D:\HospitalClinicSoftware\HospitalClinicSoftware.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" Info: creating stash file D:\build-HospitalClinicSoftware-Desktop_Qt_5_15_1_MinGW_32_bit-Debug\.qmake.stash Project WARNING: CONFIG+=designer is deprecated. Use QT+=designer instead. Project WARNING: CONFIG+=designer is deprecated. Use QT+=designer instead. Project WARNING: CONFIG+=designer is deprecated. Use QT+=designer instead. 16:47:12: The process "D:\Qt\5.15.1\mingw81_32\bin\qmake.exe" exited normally. 16:47:12: Starting: "D:\Qt\Tools\mingw810_32\bin\mingw32-make.exe" -f D:/build-HospitalClinicSoftware-Desktop_Qt_5_15_1_MinGW_32_bit-Debug/Makefile qmake_all mingw32-make: Nothing to be done for 'qmake_all'. 16:47:13: The process "D:\Qt\Tools\mingw810_32\bin\mingw32-make.exe" exited normally. 16:47:13: Starting: "D:\Qt\Tools\mingw810_32\bin\mingw32-make.exe" -j2 D:/Qt/Tools/mingw810_32/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'D:/build-HospitalClinicSoftware-Desktop_Qt_5_15_1_MinGW_32_bit-Debug' D:\Qt\5.15.1\mingw81_32\bin\uic.exe ..\HospitalClinicSoftware\mainwindow.ui -o ui_mainwindow.h D:\Qt\5.15.1\mingw81_32\bin\uic.exe ..\HospitalClinicSoftware\mainprocess.ui -o ui_mainprocess.h D:\Qt\5.15.1\mingw81_32\bin\uic.exe ..\HospitalClinicSoftware\showingdata.ui -o ui_showingdata.h D:\Qt\5.15.1\mingw81_32\bin\uic.exe ..\HospitalClinicSoftware\profile3.ui -o ui_profile3.h D:\Qt\5.15.1\mingw81_32\bin\uic.exe ..\HospitalClinicSoftware\profile.ui -o ui_profile.h g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_PLUGIN -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_NEEDS_QMAIN -I..\HospitalClinicSoftware -I. -I..\Qt\5.15.1\mingw81_32\include -I..\Qt\5.15.1\mingw81_32\include\QtDesigner -I..\Qt\5.15.1\mingw81_32\include\QtUiPlugin -I..\Qt\5.15.1\mingw81_32\include\QtWidgets -I..\Qt\5.15.1\mingw81_32\include\QtGui -I..\Qt\5.15.1\mingw81_32\include\QtANGLE -I..\Qt\5.15.1\mingw81_32\include\QtSql -I..\Qt\5.15.1\mingw81_32\include\QtXml -I..\Qt\5.15.1\mingw81_32\include\QtCore -Idebug -I. -I..\Qt\5.15.1\mingw81_32\mkspecs\win32-g++ -o debug\main.o ..\HospitalClinicSoftware\main.cpp g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_PLUGIN -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_NEEDS_QMAIN -I..\HospitalClinicSoftware -I. -I..\Qt\5.15.1\mingw81_32\include -I..\Qt\5.15.1\mingw81_32\include\QtDesigner -I..\Qt\5.15.1\mingw81_32\include\QtUiPlugin -I..\Qt\5.15.1\mingw81_32\include\QtWidgets -I..\Qt\5.15.1\mingw81_32\include\QtGui -I..\Qt\5.15.1\mingw81_32\include\QtANGLE -I..\Qt\5.15.1\mingw81_32\include\QtSql -I..\Qt\5.15.1\mingw81_32\include\QtXml -I..\Qt\5.15.1\mingw81_32\include\QtCore -Idebug -I. -I..\Qt\5.15.1\mingw81_32\mkspecs\win32-g++ -o debug\mainwindow.o ..\HospitalClinicSoftware\mainwindow.cpp