I was working on an application based on 3 panels (status bar, side bar, content) and I found out that when I create a custom widget that inherits from QWidget and uses setFixedSize() and setStyleSheet() nothing is rendered.
Everything is fine and it renders a 1280x60 rectangle (see attached screenshot 1) using a QWidget directly:
QWidget * bar1 = new QWidget(this);
Whereas this renders nothing (see attached screenshot 2):
StatusBar * bar1 = new StatusBar(this);
And StatusBar simply inherits from QWidget without adding any code:
class StatusBar : public QWidget
explicit StatusBar(QWidget * parent = nullptr);
I would expect to get exactly the same result, but apparently something is not working when inheriting from a QWidget.
A workaround is to re-implement the paintEvent() function, but this is still unexpected and wrong behavior.
I have attached an example project for reference.