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
1
vote
1 answer

Multiple windows in Qdockwidets with Qt

I'm having some trouble creating a interface with Qt. i'd like to have a dock like the one in Qt Designer (cf below): Multiple subwindows that closable (or minimisable). I found things like MainWindow::tabifyDockWidget but that's not exactacly what…
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
1
vote
0 answers

Add button to QDockWidget's title bar QT

I would like to add a button to QDockWidget's title bar. I know there is a setTitleBarWidget() function but with it I need to rewrite all the style for the title bar. The default style (like "Dock 2" in the picture), with close button, colors, etc,…
Tynnor
  • 41
  • 5
1
vote
1 answer

PyQt5 QDockWidget Title Bar Widgets

I am creating a plugin for QGIS using PyQt5 and have implemented a dock widget that shows all layers. I was wondering if it was possible to add buttons to the Title Bar of the dock widget like the ones QGIS has QGIS Dock Widget Title Bar Widgets. I…
nospec
  • 41
  • 5
1
vote
0 answers

What signal can Qt Widget catch from Virtual Desktop?

I have a C++ app which pops up a QDockWidget. I want this widget to close when the user clicks outside the widget, and have achieved this using the eventFilter() to catch the event QEvent::WindowDeactivate, and call Hide(). I also need the…
Supr
  • 11
  • 1
1
vote
1 answer

Can the TopDockWidgetArea dock widgets in a vertical layout

The top dock widget area works like a Splitter in Horizontal orientation (with additionally stacking tab feature not relevant to this question) as such: _____________________ | | | | | A| B | C | |___|_______|_________| |…
Techniquab
  • 843
  • 7
  • 22
1
vote
1 answer

How to dock/undock Widget (QDockWidget?)?

I have a widget with 4 QGraphicsViews and I want them to be dockable. I've put a QGraphicsView in a QDockWidget. Then I was able to undock the view, but I don't know how to dock the view back, where it was. At the begin, there is a bar with an…
Oli
  • 1,221
  • 2
  • 12
  • 18
1
vote
1 answer

How do I make QDockWidget expand to fill all the available space? And why can't I put more than two docks side by side?

I am creating an application in pyqt5 to plot multiple figures side by side and above/below each other, and I want to make the plots dockable. The result is not behaving the way I want/would expect and after a long time of searching the internet for…
Vinzent
  • 1,070
  • 1
  • 9
  • 14
1
vote
2 answers

PyQt5: How to Re-Dock back a floated QDockWidget via a QPushButton?

I which to bring back to initial state an Undocked or floated QDockWidget with a QPushButton. from PyQt5 import QtCore, QtGui, QtWidgets class Mainwindow(object): def setupUi(self, window): window.setObjectName("window") …
user15034500
1
vote
0 answers

Qt - Setting Focus on a floating QDockWidget

my basic process is that I create a floating dock widget and then try to give it focus. I've found that so long as it is docked in the main window then it works as expected however as soon as i call it will no longer be called correctly. Im using…
Tom 2019
  • 19
  • 2
1
vote
0 answers

Why does action button in docked widget when docked with (self.addDockWidget(Qt.RightDockWidgetArea, self.dock) doesn't work in QMdiArea?

The button action on dock widget doesn't activate or work when docked on right, left, top or bottom in Mdi but it works without MdiArea. I tested without MdiArea on a tab widget and it works fine there but with Mdi it doesn't work.
Santosh
  • 27
  • 6
1
vote
0 answers

Is there a solution for this case 'When I drag the edge to a certain extent, the central QDockWidget is hidden.'?

When I drag the edge to a certain extent, the central QDockWidget is hidden. I recorded the screen when i operated this Qt Demo wrote by me. The recording screen video link is as follow: recording screen development environment: QT5 & Qt Creator…
Ethan
  • 11
  • 1
1
vote
2 answers

How to catch KeyPressedEvent of QDockWidget in pyqt (QGIS)

I am trying to add some logic at KeyPressedEvent of a QDockWidget. It works without the QDockWidget, i.e., on the main window, but it does not work on the QDockWidget. Here is what I have tried: from PyQt5 import QtCore from PyQt5.QtWidgets import…
Sandip Nepal
  • 94
  • 3
  • 15
1
vote
1 answer

Text dissapears on QOpenGLWidget after undocking

I'm trying to integrate Qt5 and OpenSceneGraph. I've found this minimal example of embedding. When I encapsulate the widget, defined in the example, into a QDockWidget and add a simple text label to the example, the text dissapears when I undock the…
user20679
  • 442
  • 4
  • 17
1
vote
1 answer

QDockWidget does not resize properly when interacting with GUI commands of QMainWindow

I have a problem regarding the the non correct resize of the QDockWidget. Specifically when I launch the GUI, the QDockWidget appears like in the image below which is wrong. Also I adjust the size of the QDockWidget during the use of the .ui,…
Emanuele
  • 2,194
  • 6
  • 32
  • 71
1
vote
0 answers

QDockWidget does not remember floating size and location when IsFloat is toggled

QDockWidget has a feature where you can double click on the title bar and the dock will toggle to a floating window and back to its docked state. The problem is if you move and resize the floating window and then toggle back to the dock and then…
Rory
  • 113
  • 8