qwindowkit icon indicating copy to clipboard operation
qwindowkit copied to clipboard

The title bar of a subwindow is not showing.

Open ihmin opened this issue 6 months ago • 2 comments

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());

ihmin avatar Jun 22 '25 17:06 ihmin

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.

wangwenx190 avatar Jul 01 '25 02:07 wangwenx190

If something is not visible, you may need to show them first, or they are destroyed already.

wangwenx190 avatar Jul 01 '25 02:07 wangwenx190