I'm developing a GUI theme for QGIS 2.12 using QSS (QSS is very similar to CSS, but for styling Qt widgets). This is new functionality introduced in 2.12 Pisa. So far, results have been encouraging!
I want to style the QgsMessageBar. As you can see here, the default message area is tiny, so you need to scroll for anything longer than a few lines. I'd like to make it deeper.
I tried adding this to my .qss file
QgsMessageBar {
background-color: red;
height: 100px;
}
This has no effect. It's valid QSS - if there were errors, styling would break down. I've also tried to style QgsMessageBarItem
(which is the widget which contains the actual message).
I see it's possible to style QFrame
(which QgsMessageBar
inherits from). Here, I've added some padding and a thick black border - there's a lot of QFrames :) I want to style the message bar only, and leave the other QFrames alone.
After some experimentation I found this, which nearly works...
QFrame QFrame {
height: 100px;
}
However, this seems to have an odd side-effect; it opens up a new Map Composer window in the background (!)
Any idea how I can do this?
(QGIS 2.12.2 Pisa; Ubuntu Tahr 32 bit)