How resize a QDockWidget with transulant background
Unsolved
General and Desktop
-
Hi,
I made a custom QDockwidget and I set attribute Qt::WA_TranslucentBackground for a nice rendering.
Of course with Qt::WA_TranslucentBackground I haven't access to some QDockwidget grip (for resizing).
I can't resize (with the mouse) my dockwidget even If I try to grip on titlebar.
Is it possible to resize my dockwidget with Qt::WA_TranslucentBackground attributes ?
If yes how ?thanks.
Sorry for my horrible english. -
@Roy44 You could:
- Add a grip widget to handle resizing
- Resize programatically via a button click for exapnding/shrinking the widget (using
resize()
). - Write your own resizing since you wrote your own widget anyway.. This would basically mean handling mouse events and finding when the mouse is in your invisible "resize" zone then changing the mouse cursor, capturing the click and drag, doing the resize, then changing cursor back on release.