How resize a QDockWidget with transulant background

  • 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 ?

    Sorry for my horrible english.

  • Moderators

    @Roy44 You could:

    1. Add a grip widget to handle resizing
    2. Resize programatically via a button click for exapnding/shrinking the widget (using resize()).
    3. 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.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.