Questions tagged [qdockwidget]

QDockWidget is a class from the Qt framework which represents a widget which can be docked inside a QMainWindow or floated as a top-level window in the desktop. Instances of this class are also called "dock widgets", "tool palettes" and "utility windows".

Dock widgets can be placed (docked) in a special area of a QMainWindow called dock widget area, which is the area surrounding the central widget. They can also be floated (undocked) by the end user.

231 questions
27
votes
9 answers

C++ resize a docked Qt QDockWidget programmatically?

I've just started working on a new C++/Qt project. It's going to be an MDI-based IDE with docked widgets for things like the file tree, object browser, compiler output, etc. One thing is bugging me so far though: I can't figure out how to…
Zac
  • 876
  • 1
  • 8
  • 18
26
votes
1 answer

Why does FlowLayout behave differently in Qt 5.2, compared to Qt 4.8?

I've just ported my application from Qt 4.8.4 to Qt 5.2.1. I have an issue with the FlowLayout class as provided in the FlowLayout example code in the Qt docs. I have a QMainWindow with a QDockWidget docked at the bottom of the central widget. The…
c_k
  • 1,746
  • 1
  • 20
  • 35
22
votes
7 answers

QDockWidget Draggable Tabs

I am using QDockWidgets and placing two of them on the left side of my application so that tabs can be used to select between them. However, Qt's default behavior for this looks horrible and is unintuitive. Instead of being able to drag the tabs…
EricP
  • 3,395
  • 3
  • 33
  • 46
15
votes
2 answers

QDockWidget initial width

How do I set the initial width of a QDockWidget? I have implemented the sizeHint function but what next?
Phil Hannent
  • 12,047
  • 17
  • 71
  • 118
11
votes
2 answers

How to capture the QDockWidget close button click event

I have a QStackedWidget within a QDockWidget - depending on which page is shown I wish to show/hide the close button on the QDockWidget. I can do this by using QDockWidget::setFeatures(). However the issue I'm facing is how to capture the signal of…
paulm
  • 5,629
  • 7
  • 47
  • 70
11
votes
3 answers

resize a QDockWidget

I have a QMainWindow that contains several QDockWidgets. Only one of them should be shown at a time. My Problem is: When I hide a dockWidget and show another, the size of the newly shown is the same as the just hidden, no matter what QSizePolicys,…
Nythagoras
  • 131
  • 1
  • 5
8
votes
3 answers

How to avoid ugly overlap with too many dockwidgets in QMainWindow?

In our application, we have a variable number of dockwidgets because some of them are added by plugins that are loaded at runtime. Not all dockwidgets need to be visible at the same time necessarily. This depends strongly on what the user is working…
Johannes S.
  • 4,566
  • 26
  • 41
7
votes
1 answer

Delete Dock Widget in Qt Designer?

I added (via drag and drop) a QDockWidget to my GUI that I was editing in Designer... Now I want to remove it. Firstly, I selected the visible object and pressed the Delete key. The Object disappeared. However, the QDockWidget can be seen to still…
Anti Earth
  • 4,671
  • 13
  • 52
  • 83
7
votes
1 answer

Dragging QDockWidgets between QMainWindows

I have a question regarding dragging QDockWidgets between QMainWindows. I have an application with different "DockAreas" which have a QMainWindow member with one or more QDockWidgets. Additionally, I want to make QDockWidgets drag-and-droppable into…
CppChris
  • 1,226
  • 9
  • 14
7
votes
1 answer

QDockWidget showFullscreen not working on Ubuntu (gnome)

i'm trying to put a floated (undocked) QDockWidget into full screen mode. On Windows everything seems straight forward. For example i connect the topLevelChanged() signal of a dockwidget (dw) to a custom slot floatingChanged() connect(dw,…
xam
  • 155
  • 1
  • 8
7
votes
4 answers

How to set QDockWidget initial (default) size in the app with no central widget (PyQt4)?

I have an app with a lot of QDockWidgets and without central widget. I want to set some of those QDockWidgets initial size (size at application's start), but I don't want to limit their min/max sizes. How to do it? For example, I need to set initial…
Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50
6
votes
1 answer

QDockWidget causes qt to crash

I Have the version of Qt that is built into ubuntu 11.10. And am trying to use a QDockWidget that cannot actually dock (basically, I just want a window that floats. I don't want to just make the view be a top level view because then I would have…
Leif Andersen
  • 21,580
  • 20
  • 67
  • 100
6
votes
2 answers

How to resize QMainWindow after removing all DockWidgets?

I’m trying to make an application consisting of a QMainWindow, the central widget of which is a QToolBar (it may not be usual, but for my purpose the toolbar’s well suited). Docks are allowed below only. I added a QDockWidget to it, and a QAction on…
neydroydrec
  • 6,973
  • 9
  • 57
  • 89
6
votes
1 answer

Qt: How does a dock widget get its initial size?

When a widget is docked, I would like it to change direction and have minimal size relative to how the dock expands. That is, left/right dock => top-to-bottom direction with minimum width top/bottom dock => left-to-right direction with minimum…
Lorem Ipsum
  • 4,020
  • 4
  • 41
  • 67
6
votes
1 answer

PyQt5 QMainWindow, QDockWidget, fitting autosize with screensize

I've created aQMainWindow with menubar and 4 dockable widgets. First dockwidget contents multipletabs, second is Qpainter widget, third is Matlabplot and fourth is pdf report. When I run the code shows up like this below. I want to be like…
Pavel.D
  • 561
  • 1
  • 15
  • 41
1
2 3
15 16