Using Qt Designer but changes don't show up when I run.
-
Hello,
I am using Qt Designer to edit previous window text and color changes from an older program designed by someone else. The issue is that when I change a text box, or I edit the color or gradient of an object it works in the Qt Design, but when I compile it and run the program it doesn't make any of the changes to the program. I ran Qmake, but nothing.
If anyone has any ideas please let me know, it will be extreamly helpful.
Thanks!
-
Hi and welcome to devnet,
Can you try with deleting the build folder and rebuild your application ?
-
Then... Are you sure your UI file has been updated before compiling it ?
-
I went in and checked, and yes my mainwindow.ui (the .ui I was working on) was updated in the folder, and all the changes I have saved previous were there when I opend the .ui file up in Qt.
But still, when I compile and run the project as a whole, those changes do not show up. Is there a library change that I am not aware of for Qt designer in version 5? The program was writen in Qt 4 I believe.
But that doesn't explain why the text or box style doesn't save when the program is compiled when I make clear changes.
I am really confused on this one, if you are out of ideas no problem. I will plug away at this until I figure it out and I will share my findings.
-
Do you have some style sheet in your application that could be overriding the changes you're making with Designer ?
-
Hi,
i had a similar issue that my stylesheet showed correct in the Designer but not when i ran the Application, no matter turning off shadow build and cleaning everything. I found that when i want to achieve this i had to duplicate the style...
#WidgetClassName
{
blabla
}for the Designer to do its work and
.WidgetClassName
{
blabla
}for it to show correctly in the running Application. Hope this helps if you still have the issue. Maybe someone else has an easier nicer solution.
cheers
Hehe,
just tried out#WidgetClassName, .WidgetClassName
{
blabla
}... and it works... ;) so no need to duplicate it.
-
You must be keeping your Ui_*.h files somewhere else and this directory is coming in path. Just check if you had checked in this file in some directory.