Good afternoon! I'm trying to figure out why my widget, which is a child of a QWidget, is ignoring the setStylesheet parameter. In the example, it should be colored green, but it ignores that. I've painted the background of the main window red so you can see it faster. And I added a button with a title so you can see where the widget is actually located. Can someone tell me what should I do to apply the style to it?
#Qt Stylesheets not applying on my custom widgets
13 messages · Page 1 of 1 (latest)
who taught you to use Qt?
I dont have teacher
did you learn to use Qt for youtube tutorials?
I found very few tutorials, they were all very primitive. Do you have something that you could advise?
you need to open the documentation of Qt, see how these classes work, see what pointers do they expect to receive, see what callback functions are supposed to do
and debug this example
and most importantly see how these classes handle errors
As I found in comments on strange forum, I must override function paintEvent()
But I did not find a mention of this in the documentation for QT. Now it works, but I'm not sure if it's the right solution.
let me repeat, read the documentation of Qt
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.