QDockWidget - undocked - resize handle detection?
-
hi
I think its done by the Os windows manager and not adjustable from Qt. -
@mrjj Hmmm well thats a bummer. I could swear by changing/messing around with stylesheet I was able to somehow make it bigger sometimes... fairly strange we dont have qsizegrip here.
-
@Dariusz As @mrjj said this is handled by the window manager. Dock widgets have the tool window style, which on Windows 10 means there is no distinctive line around the window, instead the actual resizing area on the left, right and bottom is the shadow, or more specifically about 2/3 of that shadow which is roughly 5 pixels wide (if you don't have any scaling enabled). That's actually quite enough and it's more than previous Windows versions used (I think XP used something like 2px wide border, although it was a solid line, not a shadow).
There are couple of ways to make that wider if you're really determined, but all of them require some work (IMO it's not worth it):- On detach change the window style to something with a more distinctive border (e.g. Qt::Window, although more visible border doesn't actually mean it's wider).
- Give the dock some margin and handle the mouse event yourself to handle the resize inside the widget.
- Use QtWinExtras::extendFrameIntoClientArea and handle native events to make the border wider. Note that also means you'd have to paint that border with native API i.e. GDI, as Qt can't paint on window frames..