Using unic Stylesheet file and Qt Designer
-
Hi everyone,
I'm working from few days on a application based on Qt.
This application have différents styles inside ui files and in the code so I decided to unified all this "style ressources" in one file named style.qss.
After that, on the app instance I apply with setStyleSheet my file.Everything works fine, except that in Qt Designer style are not applied (seems logic, he don't know where to find this information).
Is there a way to set this stylesheet information to Qt Designer?
If no, can it be in the future an improvement of Qt Designer?Best regards,
Romain -
Hi
As far as I found, there is no method to set a stylesheet globally in Creator.
You can only set pr top widget, and it applies to all children.
Like setting on MainWindow and all children is affected
but it won't affect other UI files not having Mainwindow as parent.
( like parent less Dialog)
(right click MainWindow and select Change stylesheet)- no, can it be in the future an improvement of QT Designer?
Yes it could but we are user oriented forum and the Devs would not see such suggestions here.
You could open a ticket on https://bugreports.qt.io and we can vote on it.
Remember to flag it as Improvement.
- no, can it be in the future an improvement of QT Designer?
-
@Romain-C
Hi, super.
Maybe a slightly better description. ?Each widget do have a StyleSheet editor but you cannot tell
Creator/Designer a global one so if you make a new UI files the stylesheet
would already be there.So I assume what you are after is a global style sheet setting that show in Designer preview for
all UI files without u setting the styleshett manually.