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

How to set QToolButton fill in the side bar(QDockWidget) in Qt?

I wrote a minimal example which has a sidebar which contains a QToolButton on it. I set setAutoRaise(true) for the QToolButton, so when hover on it, the button will raise. But currently I have a minor issue. As you can see from the picture below,…
Theodore Tang
  • 831
  • 2
  • 21
  • 42
0
votes
1 answer

How to size QScrollArea in QDockWidget at app launch?

How do I resize a QScrollArea widget to expland to a QDockWidget's dimensions at app launch? When my app launches, the QScrollArea is too small. See photo. I want it to expand to take up the entire QDockWidget area. After app launch, if I resize…
trinkner
  • 374
  • 4
  • 15
0
votes
1 answer

Qt: right mouse click handling on QDockWidget title

Clicking right mouse button on any QDockWidget title causes list of all QDockWidget in application. To disable this beheavor I implemented special title class class QMyTitleBar : public QLabel { public: QMyTitleBar(QWidget *parent = Q_NULLPTR,…
0
votes
1 answer

How to add a maximize button to a floating QDockWidget?

How can I add a maximize button to a floating QDockWidget? I read about a method with creating a custom titlebar but I would prefer using the standard buttons instead of icons I have to add myself. The best solution would be if the title bar style…
jaba
  • 735
  • 7
  • 18
0
votes
3 answers

QTreeView no show when placed inside QDockWidget

I want to show a file system using QTreeView on a QDockWidget. The tree will be dynamically changed, so I decided to use QTreeView instead of QTreeWidget. Here is my code: QFile file(":/default.txt"); file.open(QIODevice::ReadOnly); TreeModel…
yuping
  • 21
  • 3
0
votes
1 answer

Can't rearrange `QDockWidget` on Ubuntu 14.04

I have a UI written in Qt that makes extensive use of dock widgets, primarily so that end users can customize which which docks are available, and how they are arranged. We recently upgraded to Qt 5.6.1, and the dock widgets can no longer be…
Nicolas Holthaus
  • 7,763
  • 4
  • 42
  • 97
0
votes
2 answers

how set a qt widget subproperty with StyleSheet

I would like to set the QT QDockWidget DockWidgetClosable property using a StyleSheet . However it's is inside 'features' property. How can I change it using stylesheets? I tried it without success. For instance. QDockWidget{ …
Daniel Santos
  • 14,328
  • 21
  • 91
  • 174
0
votes
0 answers

Docking multiple QDockWidgets causes segmentation fault

If I have two QDockWidgets like so: Then calling setFloating(false); ((QMainWindow*) parent())->addDockWidget(Qt::LeftDockWidgetArea, this); in any of the two dock widgets causes a segmentation fault. What would be a workaround of this problem? I…
Henricus V.
  • 898
  • 1
  • 8
  • 29
0
votes
1 answer

QDockWidgets merging incorrectly

I have a QDockWidget class and a QMainWindow: // docker.hpp class Docker : public QDockWidget { Q_OBJECT public: Docker(QString title, QWidget* parent = 0); } // docker.cpp Docker::Docker(QString title, QWidget* parent): QDockWidget(title,…
Henricus V.
  • 898
  • 1
  • 8
  • 29
0
votes
2 answers

Glimpse of QDockWidget in the middle of the screen when gets created

When I create a new QDockWidget myWidget = new MyDockWidget(this); MyMainWindow::instance()->addDockWidget(Qt::RightDockWidgetArea, mSettings); I can see it in the middle of the screen. After that I can notice it is placed docked to the right.…
Aleksey Kontsevich
  • 4,671
  • 4
  • 46
  • 101
0
votes
1 answer

Qdockwidet area positioning

Basically i am new to qt.i starded to develop app using dockwidgets.i have three LeftDockWidgetArea.how to arrange one widget in center of the LeftDockWidgetArea. addDockWidget(Qt::LeftDockWidgetArea, m_private->elementGroups, …
Althaf Ahamed
  • 51
  • 1
  • 11
0
votes
1 answer

Qt 'glue' two widgets together

I have two widgets (both QFrames), none of them have any title bar associated with them (which I achieve through setWindowFlags(Qt::FramelessWindowHint)). One of them is a main widget, and the other a sidebar sort of widget, which is supposed to…
SexyBeast
  • 7,913
  • 28
  • 108
  • 196
0
votes
1 answer

QDockwindow next to QDockWindow

I'm using qdockwidget (Qt5.5.1) to do my screenmanagement, however I am looking for a way to have a dockwidget next to my other dockwidget so the configuration would be: Mainwindow | dockwidget | dockwidget2 However I seem to only be able do dock my…
Frank
  • 2,446
  • 7
  • 33
  • 67
0
votes
1 answer

How can I create a system similar to QDockWidget but for tabs?

I had an idea I have no clue on how to implement. I'm working with Qt and I'ld like to have a system of tabs that allows me to use tabs in the same way one can use QDockWidgets, that is: with QDockWidgets one can pick a widget and use it floating…
Momergil
  • 2,213
  • 5
  • 29
  • 59
0
votes
2 answers

Qt: size of QLabel in a QDockWidget

I created a left QDockWidget, and added 2 QLabel into it. I want a squared size for my labels (by default 100x100). So when the user increases the width of the QDockWidget, how should I force my labels to keep a squared size? I tried a lot of…
hao
  • 228
  • 2
  • 9