-
Notifications
You must be signed in to change notification settings - Fork 202
Support for child windows? #33
Comments
Child windows may be supported. I just didn't test child windows. |
By the way, what do you want to tell me by showing this picture? |
You can try to make the child windows frameless. If it doesn't work, you can tell me and I'll see if there's a good solution. |
|
I'm not quite sure about this. Actually, on non-Windows platforms, I'm using the |
创建一个非top-level的子window后,原来的top-level window就抓不到WM_NCHITTEST,大概是在 const QWindow *window = findWindow(msg->hwnd);
if (!window || (window && !window->property(m_framelessMode).toBool())) {
return false;
} 这个地方被返回了。一旦抓不到WM_NCHITTEST事件后,window窗口的title area就开始响应鼠标事件了,这在正常的时候是不会响应的。 |
不是顶层窗口的话就没有 但这里我想要确保 如果不管 你知道有什么比较好的办法能判断一个句柄是不是一个独立的窗口吗? |
Hi there, great work, finally a pretty good frameless lib for our Qt app. Is there an update in the support for child windows, in particular QDockWidgets? I can make them frameless (when floating), give them a custom title bar, but FramelessWindowsManager::addIgnoreObject(..) seems not to work on them and QPushButtons on this title bar do not respond. My Chinese is bad, so maybe I missed something in this thread. Philip |
No you didn't.
Currently no, I'm sorry but currently I don't know a practical solution.
Because they are not top level windows, so all the events will be ignored by FramelessHelper. In one word, the root cause is, on Win32 platform, it's really hard to tell whether a HWND is a top level window or a child widget, without pulling in the QtWidgets dependency. I've tried Win32 APIs but they don't work well in such situations. |
Ok, thanks! Found out that I probably do not need the FramelesWindowsManager for the QDockWidgets, I can set a custom titlebar for them the moment they start floating, which makes the standard Windows bar disappear. From the Qt doc: If a title bar widget is set, QDockWidget will not use native window decorations when it is floated. |
Thanks for telling me this! I've updated the README file to mention about it. |
Hi Yuhang Zao,
If I try to use the frameless lib in my true app (MainWindow), moving the window by dragging on the custom title bar does not work. I do not receive messages of type WM_NCHITTEST in FramelessHelperWin::nativeEventFilter, while I do receive other messages there. I’m afraid it has something to do with event filters on my DockWidgets, but not sure. Any idea?
Thanks again!
Philip
From: Yuhang Zhao ***@***.***>
Sent: woensdag 12 mei 2021 02:59
To: wangwenx190/framelesshelper ***@***.***>
Cc: Flip20 ***@***.***>; Comment ***@***.***>
Subject: Re: [wangwenx190/framelesshelper] Support for child windows? (#33)
Ok, thanks! Found out that I probably do not need the FramelesWindowsManager for the QDockWidgets, I can set a custom titlebar for them the moment they start floating, which makes the standard Windows bar disappear. From the Qt doc:
If a title bar widget is set, QDockWidget will not use native window decorations when it is floated.
Thanks for telling me this! I've updated the README file to mention about it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#33 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARRBCGQXUEMYLHQYOYF6C53TNHHF3ANCNFSM4TLCAPSQ> . <https://github.com/notifications/beacon/ARRBCGTFSGMT4IUYNDNKQK3TNHHF3A5CNFSM4TLCAPS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGIDYIBQ.gif>
|
The problem lies in my QVTKWidget2, see also |
@Flip20 Sorry I'm not sure about it either. |
Should be fixed in 2.0. closing for now. feel free to reopen it if necessary. |
Is there any support for non-top level windows? I specifically mean the widgets that show up in a separate window and QDockWidget titlebar when undocked.
So far the whole library is the best out of all frameless QT solutions on Github! Looking great, but would be nice to handle the children as well.
The text was updated successfully, but these errors were encountered: