I'm trying to get myself on the right path here on understanding the things that goes within the
I use a FlowLayout, unaltered provided by the documentation here. Out of curiousity I mixed a custom widget (using QToolButton. In the end I decided against it for now because it made no sense to create a custom widget when QToolTip provides what I need.) with a standard one, and the custom wouldn't draw itself.
Thing is, a standard widget(s) such as QPushButton/QRadioButton would render nicely on the FlowLayout. But whenever I used the custom widget, unless it was isolated from standard widgets it wouldn't render.
So I was thinking, maybe I missed something? It works when you loop/add it ten times, but when you mix it with standard widgets it doesn't.
Anyway, like I've mentioned I won't be using a custom widget but, at the same time I just want to understand why it behaved that way. There's not much to show in terms of code (just make QToolButton, or PushButton your base, add it, then add a standard widget. For me it was: (Layout: StandardWidget, Custom Widget, Custom Widget) Custom Widget wouldn't show up). I'm using QT 5.4.
Can you show the code of your paintEvent ?
@SGaist Currently I don't have a paintEvent in place. I tried to look for more documentation on how I would go on drawing the widget. I wasn't planning to override it either since I don't have anything to render at the moment.
I guess I should also leave a notice that I'm still learning Qt5 and I'm still pushing it the best I can to understand the framework and see how things work so maybe I missed something basic on it.
Then what does your custom widget contain ?