This is probably a really simple question, but I have not found any text describing this.
I have the following piece of code:
QLabel *label = new QLabel("<h1>Header</h1><p>some text</p>");
Is it possible to apply a stylesheet to the h1-tag? I’ve tried
QLabel::h1 {
color: #123456;
}
But this does not work.
What is the best way to apply stylesheets to parts of the text inside a QLabel?
I might add that I’m not that experienced in stylesheets, I mostly do embedded programming.
↧