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
0
votes
0 answers

Collapsible QDockWidget when clicking on the tab

I am trying to mimic the behaviour on PyCharm, where there are docks on the edges and, if the user clicks on the tab, it exapnds and collapses the dock to increase the central widget. I managed to put the tabs on the site, and I can subscribe to the…
laurapons
  • 971
  • 13
  • 32
0
votes
1 answer

How to create Signal for QDockWidget?

When QTabWidget is used, it is straightforward to call a function (e.g. on_tab_changed) when any of the tabs is clicked on with something like self.currentChanged.connect(self.on_tab_changed). However, I cannot figure out how to do similarly with…
0
votes
1 answer

Add dockable widgets in quadrants using PyQt

I'm creating a GUI using PyQt, to display 4 images in a window, positioned in this way: Top left Top right Bottom left Bottom right I'd like to be able to undock them, but also to redock them back to any of the 4 available space. My final goal is…
Mdp11
  • 552
  • 4
  • 13
0
votes
1 answer

PyQT5 QScrollBar within QDockWidget

I have a lot of buttons, lineedits and other widgets in a window. Because they are too much for one window, I like to wrap them in a QScrollArea. All that should be in a QDockWindow. My problem: the docker window is visible and works, but none of…
Data4711
  • 39
  • 4
0
votes
1 answer

How to set text on status bar and enabled close button in QDockWidget in Qt?

I have a QDockWidget and QToolBar in it. I tried to set StatusBar for QdockWidget but it could not be set. Every QDockWidget has default close button (top most right corner) but my DockWidget does not have it ? Why ? And how to bring it back…
tushar
  • 313
  • 4
  • 10
0
votes
0 answers

QObject::connect: Cannot connect (particular signals) to (null)

I am trying to add multiple tab in QDockWidget which was inherited by class sView. For that I have written custom made signals and slots. But I am getting following error. QObject::connect: Cannot connect myView::EnableWindow() to…
tushar
  • 313
  • 4
  • 10
0
votes
1 answer

How to add tool bar at the top in QDockWidget?

I am trying to create tool bar at QdockWidget. But the icons in tool bar are not getting placed at proper position. They should come just below the title. QWidget* placeholder = new QWidget(); QBoxLayout* toolLayout = new…
tushar
  • 313
  • 4
  • 10
0
votes
1 answer

Fit minimal size of a QDockPanel after QLabel content update

I have a QDockWidget with a QGroupBox as the top widget, with QVBoxLayout applied. This contains a QChartView and a QLabel. The QLabel contains a text composed of several lines of different length. First, I would like to have the QChartView the same…
GregVDS
  • 13
  • 4
0
votes
0 answers

Docking animation for right side doesn't reappear after size adjustment while floating

In my current layout, I have a table in a dock widget that is initially docked (right side). I adjust the contents of the QMainWindow by connecting a function to topLevelChanged() to fill the blank space while…
geodranic
  • 145
  • 9
0
votes
2 answers

Customizing a QDockWidget in Qt without QtDesigner

(sry for my bad english but i'll give my best) I currently try to customize the style of several QDockWidgets. The only solution i found via the Qt Documentation -> Style Sheet is setting a Stylesheet to the Object in the QtDesignerView by right…
audrey
  • 1
  • 1
0
votes
0 answers

QDockWidget QSizePolicy to get side dock to maintain it's sizeHint unless manually resized?

In the example below, the behavior I want is when resizing the QMainWindow it should give as much space as possible to the left widget and keep the right widget at a width of 200px (the sizeHint), but I don't want to use the Fixed sizePolicy because…
pyjamas
  • 4,608
  • 5
  • 38
  • 70
0
votes
0 answers

PySide2, How to create a Widget above Docking

The docking is created as required. What I'm not able to do is creating 'Shelf' widget above docking. It shouldn't be part of docking and it should remain at the top. When hidden, docks should cover up the space and when shown again docks should…
Prashant
  • 833
  • 1
  • 11
  • 17
0
votes
1 answer

Move widget with cursor to another layout

I want to simulate QDockWidget/QToolBar behavior for custom widget, unpin widget with mousePressEvent from one location and pin it to another location. Like place upper frame to 'sub' location: I'm able to unpin it with the following code: class…
JuicyKitty
  • 318
  • 1
  • 16
0
votes
1 answer

QGraphicsScene not showing in QGraphicsView in QDockWidget when called from MainWindow

I have a QGraphicsView in a QDockWidget, in which I'm displaying a PNG image. If I create a QPixMapItem in the dockwidget's constructor, and call a dockwidget's member function (a public slot) from within the constructor to display the image, it…
0
votes
1 answer

QDockWidgets, set nested state from UIDesigner

I created a QtGui with the GuiCreator and added some DockWidgets. I can only allow the nested state from the property editor but how can I set it active for the DockWidgets? At runtime the user can move the DockWidgets and if one DockWidget is moved…
SingleTron
  • 61
  • 6