How do I make *.ui files look like real interface of an app?
-
Hello everyone!
I'm new to Qt and to programming. I develop an application where I apply .qss to a whole window or individually to each component by using a->setStyleSheet(styles->pushButtonDefault) (styles is .cpp file where I store qstrings with different stylesheets). But these changes aren't displayed in the .ui in Qt Creator. Adding styles directly to components in the .ui file doesn't work for me because some components are created dynamically and some styles are changed while application is running (for example if you put wrong number in the input field, the field becomes red).
So, the question is: is it possible to show changes to UI in the Qt creator .ui files?I use Qt 5.15.2 and C++
Thanks ๐๐ผ
-
@RDWTT Qt Creator (Designer) cannot display a preview of anything that is not in the
.ui
file.The
.ui
files are text used to generate source code before compilation. What you are asking for is indeterminate changes made at runtime, i.e. after compilation and deployment, to somehow roll back into the.ui
file. I cannot see how this would be achievable (or useful).The way to see how the ui looks in this circumstance is to build and run your program.
-
โฆand on a side note: Qt 5.15 isnโt ideal to start developing a new app! Much better to start with 6.5!