How to link external qss Stylesheet inside QT designer .ui file
Asked Answered
N

1

6

I have downloaded these stylesheets of QT designer: https://github.com/Alexhuszagh/BreezeStyleSheets

And I would like to link the qss file "dark.qss" directly in the .ui file in the QT designer, "Edit Style Sheet" Menu.

The stylesheet has a resource "qrc" file which is recognized by QT designer. And in the "Edit Style Sheet" Menu I see the option to select the dark.qss file. The only problem is I get an error "Invalid Style Sheet" when adding it with url.

I have tried copying the content of dark.qss directly in the "Edit Style Sheet" Menu. And this works. It actually changes the style. But I would prefer to have a link to the qss file instead of the complete code.

Is it possible to link the qss file using the "Edit Style Sheet" Menu?

enter image description here

Normannormand answered 17/9, 2020 at 11:15 Comment(0)
E
2

No, You can not. You have to load the file using QFile and load it into app as the README of the repository shows.

Ethanol answered 17/9, 2020 at 19:5 Comment(2)
I did it like the readme says...but the problem was after making some updates to the .ui file the changes are goneNormannormand
@Mihail-CosminMunteanu I don't understand you, it seems you have an XY problem.Ethanol

© 2022 - 2024 — McMap. All rights reserved.