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
6
votes
1 answer

QDockWidget form in Qt Creator Designer

I'm using Qt Creator 4.5.0 and am trying to create a QDockWidget that I could modify in the builtin designer (I do this all the time with QDialogs and QMainWindows, so this is the first time trying with a QDockWidget). But I'm having no luck with…
Stanton
  • 904
  • 10
  • 25
6
votes
1 answer

Applying a layout to a QDockWidget in PyQt5

I'm trying to create a docked interface in PyQt5, creating a BoxLayout contining my various widgets, and then applying this layout to the QDockWidget. My approach so far has been: self.layout =…
Masutatsu
  • 434
  • 1
  • 7
  • 19
6
votes
1 answer

How to disable the context menu of a QDockWidget title bar

I have a couple of QDockWidgets that are all not closabale (using Qt 5.6). Therefore, the context menu that is displayed when right-clicking a title bar of one of them only has disabled entries, and I would like to disable the whole context menu. I…
Tobias Leupold
  • 1,512
  • 1
  • 16
  • 41
6
votes
1 answer

QDockWidget float/close button hover images

Is there a way to change the hover/pressed icons for a QDockWidget(Qt 4.8) in a stylesheet? I'm using this style to change the button image for the default state: QDockWidget{ font-weight: bold; titlebar-close-icon:…
mfessenden
  • 598
  • 4
  • 12
6
votes
1 answer

Set QDockWidget border when docked and floating

I'm trying to style my QDockWidget so that it has a border when docked and when floating. I tried: QDockWidget { border: 5px solid purple; } But this only produced a border when floating. When docked, the border just disappeared. How can I…
John-Luke Laue
  • 3,736
  • 3
  • 32
  • 60
6
votes
2 answers

How to find the height of a QDockWidget title bar?

I'm trying to find the height of a QDockWidget title bar in order to do some intelligent sizing of a custom layout, but the title bar is not a separate widget, it's built into the private layout of the dock widget, and there is no member to access…
Nicolas Holthaus
  • 7,763
  • 4
  • 42
  • 97
6
votes
1 answer

Multiple widgets on a QDockWidget

I'm making a little app for applying various filters on an image using Qt and C++. My question is, is it possible to add multiple widgets on a QDockWidget ? As i want to add buttons for re-applying the last 5 filters on the dock. Here is an example…
IgZiStO
  • 325
  • 6
  • 17
5
votes
3 answers

QDockWidget with a QGridLayout - Widget within the Layout do not align to the top

I'm attempting to create a dockable toolbar (similar to what you use in Photoshop) that will hold a 2 x (n) grid of buttons. My idea is to use a QGridLayout parented to a blank QWidget, which is added to a QDockWidget, and add buttons to the…
dajaffe
  • 855
  • 13
  • 34
5
votes
2 answers

Maximize and minimize buttons in an undocked QDockWidget

I´ve been trying to add the buttons to an undocked QDockWidget window as I normally do for a QDialog, but with no success as follows: QDockWidget* dw = new QDockWidget(QString("Stream %1").arg(i + 1), this); dw->setWindowFlags((dw->windowFlags() |…
Petar Petrov
  • 702
  • 5
  • 14
5
votes
2 answers

Prevent QDockWidget autosizing behaviour

Qt 5.5.0 In my application, I have a QGraphicsView as the main widget and a QDockWidget for properties. The goal is for the user to select an item in the graphics view and, depending on the item, present the appropriate properties for that item. I…
Garrett Fleischer
  • 177
  • 1
  • 3
  • 13
5
votes
1 answer

Create a QDockWidget that resizes to it's contents

I have an application where fixed-size child widgets need to be added programatically to a dock widget at run time based on user input. I want to add these widgets to a dock on the Qt::RightDockArea, from top to bottom until it runs out of space,…
Nicolas Holthaus
  • 7,763
  • 4
  • 42
  • 97
5
votes
3 answers

Hide label text for Qt tabs without setting text to empty string

I need a QTabWidget with icons only: How can I hide the label text of a tab in Qt? I cannot set the text to an empty string (""), as I am using docked widgets ( QDockWidget ) and the label text is set automatically (and I need it if the widget is…
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
5
votes
1 answer

Qt - How to show tabs of tabified dockwidget at the top instead of the bottom

In Qt, you can tabify dockWidgets. If I do that, the tabs show on the bottom of the dockWidgets, as is shown in the left sketch. This is the behavior I get under Windows 7 with the latest Qt4 and PyQt4. How can I tell Qt to place the tabs on the…
Jesper Freesbug
  • 415
  • 4
  • 11
5
votes
1 answer

Tabify 3 QDockWidget

How can I create a tabified dock for 3 widgets in QMainWindow? I'm using the code bellow: widget1 = new QDockWidget(this); widget1 ->setObjectName("name1"); addDockWidget(Qt::LeftDockWidgetArea, widget1); widget2 = new QDockWidget(this); widget2…
Victor
  • 8,309
  • 14
  • 80
  • 129
5
votes
2 answers

How to have detachable tool windows in Qt

I am developing a tool which will have some variable sized windows. I am able to achieve this using the QSplitter horizontal & vertical. Please see attached image. Now, how to make these individual windows detachable/maximize/close? How can I add…
user1870619
  • 177
  • 1
  • 6
  • 12
1
2
3
15 16