qwindowkit icon indicating copy to clipboard operation
qwindowkit copied to clipboard

setTitleBar fails when registering a title bar inside a window embedded in the main ApplicationWindow

Open YunhaoZZ opened this issue 1 year ago • 1 comments

For some reason I need to register two hWND to the qml main window with QQuickItem. And in order to avoid other components being covered by those, I have to put all other components into a embedded window inside the main ApplicationWindow.

I found out when i put the title bar that I want to register with setTitleBar, it does not support the ability of a title bar, such as resizing, dragging, and toggling fullscreen.

Wondering if it's just my way to set up the title bar being wrong or qwindowkit just doesn't support registering something in a embedded window as the titlebar of the outside main ApplicationWindow.

I'd appreciate any information! Thank you :)

Edit: Qt version 6.7.2

Code snippet: `ApplicationWindow { id: mainApp

WindowAgent {
    id: windowAgent
}

 Component.onCompleted: {
    windowAgent.setup(mainApp);
 }

 Window {
        id: child
        
         TitleBar {
            id: titleBar
            Component.onCompleted: {
                   windowAgent.setTitleBar(titleBar);
            }
 }

}

YunhaoZZ avatar Sep 12 '24 17:09 YunhaoZZ

Not a tested case, in most cases you should avoid doing so.

wangwenx190 avatar Nov 04 '24 02:11 wangwenx190