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
4 answers

Setting QDockWidget::title StyleSheet

My initial problem was to make QDockWidget title bold. I tried this and it worked: myDock->setStyleSheet("QDockWidget { font: bold }"); But I can't understand why the following code doesn't work: myDock->setStyleSheet("QDockWidget::title { font:…
hank
  • 9,553
  • 3
  • 35
  • 50
1
vote
1 answer

Cannot add a background image to a QDockWidget

As far as I can tell, the way you make the background of a widget to be an image is to modify the qstylesheet to say: background-image: url(); Which seems to work, unless it's the QDockWidget's main widget. This is what I…
Leif Andersen
  • 21,580
  • 20
  • 67
  • 100
0
votes
1 answer

How to make QDockWidget to expand when the window is resized?

I have a simple form: QDockWidget on the right side, QGroupBox on the left side of QMainWindow. QGroupBox is layed out using vertical layout. I want QDockWidget to be expanded and occupy all the free space when the main window is enlarged or…
Dmitriy
  • 5,357
  • 8
  • 45
  • 57
0
votes
1 answer

Wierd DockWidgets effect

Using the QMainWindow I have added 3 DockWidgets and set centralWidget to 0, so now the DockAreas can take up all the space. Have a look: This looks the way I want and behaves even more so. But There is one effect that breaks it all. When I rip…
TeaOverflow
  • 2,468
  • 3
  • 28
  • 40
0
votes
2 answers

Qt Designer dock widgets children acess

I made a form using the Qt Designer which has some dockwidgets, these dockwidgets have some children widgets. How I can access the dockwidget and these child widgets in my mainwindow.cpp?
Wazery
  • 15,394
  • 19
  • 63
  • 95
0
votes
1 answer

How to make QDockWidget not to shrink QFrame logo?

My application has a horizontal top logo that is stretched through all the main window. When I add a QDockWidget it shrinks logo. I want it to be docked under the logo frame. How do I do it?
Dmitriy
  • 5,357
  • 8
  • 45
  • 57
0
votes
1 answer

signals/slots setup in Dock widget that contains many tab widgets

I have a class that inherits QDockWidget. This class has four QTabWidgets in it (tcp stuff, ftp stuff, sql stuff and settings), each of which has its own functionality meaning each one has different signals/slots that need to be captured or called.…
TheFuzz
  • 2,607
  • 6
  • 29
  • 48
0
votes
1 answer

Create "closed-state" QDockWidgets from UIDesigner

I wonder if it's possible to somehow prepare DockWidgets from the UI-Designer. There's no Object-Property like "visible" or "closed" so if I want to create another MainWindow from the MainWindow-Constructor and then set it as the DockWidget's Widget…
netsky
  • 117
  • 1
  • 8
0
votes
1 answer

QDockWidget - QGlWidget - invalid drawable when widget is dragged out from the dock

I have a QDockWidget object in my application, which contains a QWidget object inside it. When my application runs, everything seems fine. However when I moved the widget from the QDockWidget (dragged it out from the Dock widget), I suddenly got…
all_by_grace
  • 2,315
  • 6
  • 37
  • 52
0
votes
0 answers

pyqt5 tabifyDockWidget and hide the tabbar

Im creating a pyqt5 app that uses dockable widgets. The initial design used a stacked widget with nice buttons to switch pages. Ive been able to mimic the behavior by using tabifyDockWidget to place the pages in a dockable setting. I use the…
pyNewbie
  • 155
  • 1
  • 2
  • 10
0
votes
0 answers

Why does the border of QDockWidget become wider setting centerwidget stylesheet?

Here is my code: QDockWidgetTest::QDockWidgetTest(QWidget *parent) : QMainWindow(parent) { QDockWidget* dockWidget = new QDockWidget(); QTabWidget* tabWidget = new QTabWidget(); tabWidget->addTab(new QWidget(), "1"); …
zebra
  • 1
  • 1
0
votes
1 answer

How to keep the user-adjusted width of QDockWidget after maximizing and restoring QMainWindow

I have placed 2 QDockWidgets in a QMainWindow, one on the left and one on the right. Here is my code: test_dock_widget.py # -*- coding: utf-8 -*- import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QMainWindow, QApplication,…
Dawn Wren
  • 3
  • 1
0
votes
0 answers

Floating QDockWidget appears not on the same screen as the main window when dragged

I'm completely stuck with the following problem. When I drag a dock widget out of the main window, which is placed on the second screen, the floating dock appears on the first screen. When I click on the float button, it appears undocked correctly,…
Bibasmall
  • 33
  • 4
0
votes
0 answers

Tabified QDockWidget does not save its layout

Problem I'm creating the main window with multiple dock widgets. My current goal is to save the whole layout on exit. Everything works fine until I try to tabify some of my dock widgets using the tabifyDockWidget() method. And now the tabified…
John Doe
  • 555
  • 6
  • 17
0
votes
1 answer

QDockWidget does not dock any longer on doubleclick in pyQt5

I had a solution in pyQt4 to undock-dock a tab from/to a QTabWidget by using QDockWidgets and the code below. After floating a tab, the re-docking was obtained by double clicking the titlebar of the QDockWidget. But it does not work any more in…
user3650925
  • 173
  • 1
  • 10