Important: Please read the Qt Code of Conduct -

Increase floating QDockWidget resize margin size

  • I am using a QDockWidget.

    When floating, the resize margin is really small (where the mouse cursor changes to signal vertical/horizontal/diagonal resizing)

    How can I increase this?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you mean the "external" window part. It's the window manager that handles it not Qt.

    By the way, what OS are you on ?

  • @SGaist, thanks for your response!

    When the QDockWidget is docked inside the QMainWindow, then the resize margin is fairly wide, as I have highlighted in red in this picture:

    docked in QMainWindow has a large resize margin

    However, when floating, the resize handle margin reduces to a single pixel, as highlighted in red in this picture:

    floating, QDockWidget has a very small resize margin

    Re OS: I'm on Ubuntu Gnome 14.04, which uses Gnome 3 desktop.

    If it's handled by the window manager, is there a way to programatically change this within my app source?

    BTW, apologies for the delay in responding... Is it possible to subscribe for instant email notifications upon activity in threads I've participated in?

  • I just ran my test app in an Ubuntu 14.04 default environment (so running Unity window manager), and the resize margin is significantly larger.

    As such, I would agree with @SGaist that this is indeed a window manager issue, and seems to be down to Mutter and/or the default Gnome 3 theme (which is Adwaita I think?)

    Seems like this is a question better destined for a Gnome 3 forum.

  • Lifetime Qt Champion

    Indeed, don't forget to update this thread once you have more information from them :)

Log in to reply