#include #include int main(int argc, char* argv[]) { QApplication app(argc, argv); auto w = new QDockWidget; auto button = new QLabel(QLatin1String("Some title")); w->setTitleBarWidget(button); w->resize(600,600); w->setAutoFillBackground(true); auto palette = w->palette(); palette.setColor(QPalette::Background, QColor(0,0,0)); w->setPalette(palette); w->show(); app.exec(); return 0; }