stdware / qwindowkit

Cross-platform frameless window framework for Qt. Support Windows, macOS, Linux.
Apache License 2.0
490 stars 78 forks source link

the window can't be moved if call this->winId() in the widget #50

Open tinybug opened 6 months ago

tinybug commented 6 months ago

If I add this line here the window can't be moved by dragging the title bar:

image

Window can't be moved if I drag the title bar:

image

Built by qt 5.15.10_msvc2019_64, this bug maybe happen in the Qt source code, who can help with this bug? Thanks.

SineStriker commented 6 months ago

This is a big problem, a frameless window will not receive WM_HITTEST if it has a native child window, I have been researching for a long time but now can't find a solution. If you really need to move an outside widget into the frameless window, you could wrap the widget with another frameless container.

tinybug commented 6 months ago

@SineStriker I found this bug because of I want to use mpv player in the Qt, mpv need to call the winId() to get the id for it. Yes, I also found that will not get WM_HITTEST event when I call winId(), and I think it may has some bugs in the Qt source code, but I have no spare time to debug the Qt source code, I will try to figure it out if I have time. Anyway, thank you for your efforts.