Important: Please read the Qt Code of Conduct -

QDockWidget border gap

  • Hello everyone.

    I recently started developing a simple application with Qt 5.1 and have encountered a problem, which may be a newbie question.
    In my main view I use QDockWidget for my top tool bar, instead of QToolBar (which I cannot find in designer but it seems to be present in code).
    To get the best look and feel from it, I also removed title bar, and set it's minimum and maximum height 100px.

    This is where my problem started. Usually when a dock widget is docked, it will have some sort of border which you can use to grab and resize the widget, however when minimum and maximum height are the same value, widget cannot be resized and the border disappears, and leaves an ugly 1px gap between dock and main widget.

    I want to either remove this gap or get border to appear and re-color it to suit my needs.

    I found that this gap/border may set by pixel metrics, but i have no idea how to use that.

  • Hi,

    If you remove the title bar I think you have no where to grab it. That is what the title bar is for. If you remove the default title bar I think you must implement your own.

Log in to reply