Hi All,
I would like the users to be able to customize the default look of our applications by simply loading their own CSS files. How do we accomplish that? Can anybody give me a jumpstart?
Hi All,
I would like the users to be able to customize the default look of our applications by simply loading their own CSS files. How do we accomplish that? Can anybody give me a jumpstart?
There is a -stylesheet commandline parameter QApplication supports. You can also just load the file directly in your app and apply its contents as the stylesheet of the application object.
So if were the user, all I have to do is create a QT Stylesheet, place it in a folder and run the application with the -stylesheet parameter?
You can place it anywhere you want as long as you tell the application where the file is. Just check the source code first, I'm not sure the switch is actually called -stylesheet.
The styles for the controls work but not when I'm trying to load a background image for the MainWindow. I tried:
QMainWindow{
background-image:url(image_256_8bit_latest_back.png);
}
Can you tell me what's wrong with this StyleSheet?
Bookmarks