qwindowkit
qwindowkit copied to clipboard
The title bar of a subwindow is not showing.
The title bar of a subwindow is not displaying. Does only the QMainWindow support title bar?
auto window = new QWidget();
auto agent = new QWK::WidgetWindowAgent(window);
agent->setup(window);
auto titleLabel = new QLabel("aaaaaaaaaaa");
titleLabel->setAlignment(Qt::AlignCenter);
auto windowBar = new QWK::WindowBar();
//windowBar->setTitleLabel(titleLabel);
//windowBar->setHostWidget(window);
agent->setTitleBar(windowBar);
//agent->setHitTestVisible(menuBar, true);
agent->setSystemButton(QWK::WindowAgentBase::WindowIcon, windowBar->iconButton());
agent->setSystemButton(QWK::WindowAgentBase::Minimize, windowBar->minButton());
agent->setSystemButton(QWK::WindowAgentBase::Maximize, windowBar->maxButton());
agent->setSystemButton(QWK::WindowAgentBase::Close, windowBar->closeButton());
QWK supports subwindows. I can't find any subwindow from your given code. Every frameless window need a seperate WidgetWindowAgent and a title bar, you can't share them between different windows.
If something is not visible, you may need to show them first, or they are destroyed already.