[solved] Applying stylesheets to HTML tags in QLabel
-
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.
-
-
OK, then I'll solve it some other way.
Thanks :)
-
That was actually my first solution, but I wanted to place as much of the style-setting in the CSS file. I think I'll split the information into several QLabels instead, and control each label with the stylesheet.