Questions tagged [qmdiarea]

The QMdiArea widget, part of the Qt framework, provides an area in which MDI windows are displayed.

QMdiArea functions, essentially, like a window manager for MDI windows. For instance, it draws the windows it manages on itself and arranges them in a cascading or tile pattern. QMdiArea is commonly used as the center widget in a QMainWindow to create MDI applications, but can also be placed in any layout.

64 questions
1
vote
2 answers

How to make a QMdiArea subwindow widget non-resizeable?

So the non-QMdiArea version of my code, MyWidget::MyWidget(QWidget* parent) { ... layout()->setSizeConstraint( QLayout::SetFixedSize ); } MainWindow::MainWindow(...) { ... MyWidget* wgt = new MyWidget(NULL); wgt->show(); } works…
Matt Phillips
  • 9,465
  • 8
  • 44
  • 75
1
vote
1 answer

Tab size of QTabBar in QMdiArea

My QMainWindow is using QMdiArea. The viewMode of the QMdiArea is set to TabbedView. The Tab size of MdiArea takes entire width of the MdiArea: If more tabs are added, they divide MdiArea width and consume entire width: I understand that the…
Ajay
  • 344
  • 3
  • 15
1
vote
0 answers

Is it safe to call disconnect with a deleted object as sender or receiver argument?

I have an application with a QMdiArea. There's some incoming and outgoing signals connected to the widget in the currently active subwindow. Whenever the active subwindow changes I want to disconnect all the connections to the previously active…
Unimportant
  • 2,076
  • 14
  • 19
1
vote
0 answers

PyQt6 - QPalette not working correctly with mdiArea windows

I am using QMdiArea to hold a bunch of windows, I want to be able to set the color theme of all the windows based on a list of items found in one of the subwindows. It seems to work fine with PyQt5 but using PyQt6 it changes the color when the user…
Jas
  • 11
  • 3
1
vote
1 answer

How to scale a QPixmap preserving aspect and centering the image?

I want to use an image (svg file) as background in an QMdiArea. I load the image as QPixmap and scale it in the resizeEvent method to the size of the QMdiArea using self._background_scaled = self._background.scaled(self.size(),…
Goswin von Brederlow
  • 11,875
  • 2
  • 24
  • 42
1
vote
1 answer

PyQt user logo in center of MDI Area

I have been working on PyQt QMainWindow QMdiArea Class. I have been able to change the background colour as it is needed for my application. However, I am unable to add a logo in the centre of the window. I have tried QBrush but that just insert…
Ammad Ahmed
  • 100
  • 1
  • 8
1
vote
1 answer

How do I dock a subwindow in an MDI Area in pyqt5 using qtDesigner

I am trying to create a subwindow in an MDI area in pyqt5, using a .ui file for my main window. When I trigger the action to show the subwindow, it shows up as a separate window (not docked in the MDI area as intended). I've tried adding the…
tmorgan497
  • 45
  • 4
1
vote
1 answer

Application QMdiarea with QSplitter and QMainWindow

I want to apply QMdiarea to QMainwindow with QSplitter, There are few posts about QMdiarea, but none of them really explain how to be applied to such QtWidgets. My code: class Mywindow(QtWidgets.QMainWindow): def __init__(self, parent=None): …
Pavel.D
  • 561
  • 1
  • 15
  • 41
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
1 answer

PyQt5 signal communication error

I need your help with the following problem that I've encountered. I have two Python files, Main.py and Module.py, which need to communicate using PyQt5 signals. Here's the code: Main.py from PyQt5.QtCore import * from PyQt5.QtGui import * from…
Beller0ph0n
  • 105
  • 1
  • 2
  • 10
1
vote
0 answers

Creating mdiArea subwindow from another file

I'm having a trouble with creating a sub window (which should be created within a different Python file) inside mdiArea located within my main window class. My_app.py from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import…
Beller0ph0n
  • 105
  • 1
  • 2
  • 10
1
vote
2 answers

A FigureCanvasQTAgg nested in a QMdiSubWindow segfaults when i minimize the QMdiSubWindow

I am trying to have FigureCanvasQTAgg inside QMdiSubWindow such that the user can create his/her own plots on the fly. I have made this very small self contained code: from PyQt4 import QtGui from matplotlib.backends.backend_qt4agg import…
plaindev
  • 131
  • 1
  • 1
  • 9
1
vote
2 answers

Using QMDIArea with Qt 4.4.

I'm using the QMdiArea in Qt 4.4. If a new project is created, I add a number of sub windows to a QMdiArea. I'd like to disallow the user to close a sub window during runtime. The sub windows should only be closed if the whole application is closed…
nutario
  • 773
  • 1
  • 9
  • 15
1
vote
1 answer

After maximising a QMdiSubWindow the next QMdiSubWindow to be selected is also maximised. How do I stop this?

Edit: I thought this was a bug, it is actually default behavior as described (completely buried more like) in the Qt documentation... "When the active subwindow is maximized, the default behavior is to maximize the next subwindow that is…
Troyseph
  • 4,960
  • 3
  • 38
  • 61
1
vote
2 answers

qt positioning controls in QMdiSubWindow

I have problem with positioning controls in QMdiSubWindow derivate. I designed my window using QtDesigner, and it looks like this: When I run the app it looks like this (button on the title bar): It gets ok only in maximized mode: But I would…
murison
  • 3,640
  • 2
  • 23
  • 36