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

Restore geometry and state of an arbitrary QDialog

In our applications we are using customizable dialogs using exhaustively QSplitter, so that our customers can rearrange the dialogs to fit their needs. (Sometimes we are also using QDockWidget, but this seems to be similar.) Now, it is very…
Aleph0
  • 5,816
  • 4
  • 29
  • 80
1
vote
0 answers

How to avoid dockwidget overlap with other object in main window when resize it in code in run time?

I create a dock widget in qt GUI and add a tree table widget on it. More than these in main menu I have others objects such QGraphicsView. In run time when I manually resize the dock's width, it pushes or pulls main window with it's objects and…
M.Hu
  • 121
  • 1
  • 14
1
vote
1 answer

Update a QDockWidget's subwidgets which already happens naturally upon hovering over with mouse

I have a QDockWidget in a QMainWindow, the QDockWidget contains a stack of QUndoViews containing commands that I want to change the text of in the QUndoView. You accomplish this by doing command.setText(). However, the QUndoView is only showing…
MathCrackExchange
  • 595
  • 1
  • 6
  • 25
1
vote
1 answer

Notification when QDockWidget's tab is clicked?

I need to execute a block of code when the user clicks on the tab of a tabbified QDockWidget. So far I've been doing this via a hack using the "visibilityChanged" event but this is now causing issues (for example, if I have several tabbified dock…
LKeene
  • 627
  • 1
  • 8
  • 22
1
vote
1 answer

Reset focus in tabified dock widgets

Currently I'm having trouble with the focus of tabified QDockWidgets. Working with this small example using two tabified QDockWidgets: from PyQt5.QtWidgets import QApplication, QMainWindow, QDockWidget, QTextEdit from PyQt5.Qt import Qt app =…
Skandix
  • 1,916
  • 6
  • 27
  • 36
1
vote
1 answer

How can I specify seperators using QDockWidget?

I have the following example code: from PyQt5 import QtWidgets, QtCore, QtGui import sys class MainWindow(QtWidgets.QMainWindow): def __init__(self, parent=None): QtWidgets.QWidget.__init__(self, parent=parent) self.bgcolor =…
Jonas
  • 1,838
  • 4
  • 19
  • 35
1
vote
0 answers

Icons for tabified dockwidgets

I have six different classes for different dock widget (for different content). I tabify all these six in a "DockView" class, until here everything works without any problems. Now my problem, i must have some icons on the tabified dock widgets. I've…
erniberni
  • 313
  • 5
  • 17
1
vote
1 answer

How to set different text for a QDockWidget's tab and window title?

I've subclassed QDockWidget and I am setting the title-bar text via myDockWidget.setWindowTitle("Some text"). However, I'd like to display different text in the tab when the widget is docked. In other words, when the widget is docked, I'd like to…
LKeene
  • 627
  • 1
  • 8
  • 22
1
vote
1 answer

Docking a QDockWidget when application starts?

I have a class that constructs a widget that I am able to dock into my main application. This class inherits QDockWidget. This allows me to dock the widget if I so please. However, I would like for this widget to be docked by default instead of…
earth
  • 945
  • 1
  • 10
  • 27
1
vote
1 answer

Un-tabify three QDockWidgets programmatically

I have an application with three dock widgets. Those are created by the following code: dock = new QDockWidget(tr("Some…
Tobias Leupold
  • 1,512
  • 1
  • 16
  • 41
1
vote
2 answers

How to made a QDockWidget appears in taskbar?

I use a subclass of QDockWidget with a little trick. The "topLevelChanged" signal is connected to this member slot : void MyDockWidget::updateWindowFlags(bool topLevel) { if (topLevel == true) { …
Aurelien
  • 1,032
  • 2
  • 10
  • 24
1
vote
0 answers

PyQt4: Trouble making a custom dock TitleBarWidget

I was hoping someone could help me with creating a custom title bar widget for a dock widget in a PyQt4 GUI program. All I want to do is emulate the exact same look and function of the default title bar, but with an extra, custom button. I couldn't…
teapout
  • 11
  • 1
1
vote
1 answer

How could I change the height of title bar on QDockWidget?

I use the following code: int SWStyle::pixelMetric( PixelMetric which, const QStyleOption *option, const QWidget *widget ) const { switch (which) { case PM_DefaultFrameWidth: return 1; case PM_TitleBarHeight: return…
user497032
  • 75
  • 1
  • 10
1
vote
0 answers

Is it unusual for QDockWidget to behave like this?

I am a beginner in Qt and I want to make three QDockWidgets appear on the screen in the left, right and bottom. Here's the code : .h file QDockWidget *dock1 = new QDockWidget("Left dock"); QDockWidget *dock2 = new QDockWidget("Right…
Hung Truong
  • 401
  • 1
  • 3
  • 12
1
vote
4 answers

Can QTreeView be added to QDockWidget

Does anyone has a short example (hopefully in C++) to illustrate adding a QTreeView to a QDockWidget? I tried to use QLayout as an intermediate object, as: QFile file(":/default.txt"); file.open(QIODevice::ReadOnly); TreeModel…
yuping
  • 21
  • 3