Hi, our project is using style sheets to set the menu background like so:
menu->setStyleSheet("QWidget { background: url(C://lobby_bg.jpg) }");
menu->setStyleSheet("QWidget { background: url(C://lobby_bg.jpg) }");
To copy to clipboard, switch view to plain text mode
This works fine, but now we want to make our QPushButtons have an image for a background, so we tried this:
button->setStyleSheet("QPushButton { background: url(C://lobbybuttontest.jpg) }");
button->setStyleSheet("QPushButton { background: url(C://lobbybuttontest.jpg) }");
To copy to clipboard, switch view to plain text mode
But this doesn't work. According to the documentation, QPushButton should be able to use "background: url()"
Does anyone have any ideas why its not working?
Also, is this an acceptable way to do something like this. In the documentation I read about creating your own QStyle, but to be honest it seems very involved and confusing.
Bookmarks