Questions tagged [qmainwindow]

QMainWindow is a class in Qt library that implements the main window of an application.

As a main window for the application, QMainWindow is different from an ordinary widget. It has a menu bar on the top, a status bar, it can also have toolbars and dock widgets.

It also have a so-called Central Widget, which can be occupied by any other widgets.

Qt also allows one to easily implement single- and multiply-document-interfaces with this class.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

516 questions
0
votes
0 answers

Qt - Hiding window when the close button is hit

I am trying to implement a terminal in my application. Currently, class Terminal inherits from QMainWindow, and all of its contents are lost if the close button is triggered. This does not affect the main application though. I want the contents to…
Henricus V.
  • 898
  • 1
  • 8
  • 29
0
votes
1 answer

QObject::connect: No such signal progressbarV::keyReleaseEvent()

I am trying to create a project in which I have a progressbarV class which creates a QProgressBar. I am calling this class in my mainWindow. My aim is to navigate to another screen when I click on the progressbar. I tried to implement KeyRleaseEvent…
Sam
  • 113
  • 5
  • 13
0
votes
1 answer

How to add and show the contents of a widget onto another widget in QT?

I have created a class horrizontalprogressbar in which i created a simple progressbar. I have another class called mainwindow and I would like to access and display the contents of horrizontalprogressbar on mainwindow. I tried a lot off things here,…
Sam
  • 113
  • 5
  • 13
0
votes
2 answers

Allow Close Button on QMainWindow when QDialog is Open

I have one issue with Qt Close Option when there is QMainWindow is open and on Push button Clicked I am opening one QDialog.Now my requirement is to allow close option is QMainWindow to call closevent of QMainWindow . Now the senario is when I…
P Kumar
  • 105
  • 1
  • 2
  • 12
0
votes
1 answer

Notify QMainWindow toolbar about fullscreen mode switch

In QWindow there is a signal windowStateChanged(Qt::WindowState). I'm looking for similar signal in QMainWindow. Is it available? I need it to notify toolbar about fullscreen change, as I have a checkable toolbar button which changes window to…
qiubit
  • 4,708
  • 6
  • 23
  • 37
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

Widget hidden by default

I'm totally new to Qt framework. What I'm trying to get is to hide all widgets when I start my program, so when the MainWindow is opened. I'm not coding it. I was just editing the program in "Design" editor. I was looking for an option where I can…
Dawid Zbiński
  • 5,521
  • 8
  • 43
  • 70
0
votes
2 answers

How to embed a plot directly into a Window (python; QT;)

I wanna embed a Matplotlib plot directly into a window, QMainWindow. It should be part of my program with a more complex GUI. ;) The only way I found was to add the figure as widget into a QTabWidget. See sample code below. I lost the link to the…
Fabian
  • 51
  • 1
  • 6
0
votes
2 answers

How to resize the designer-space in qt-creator if needed when developing?

As I am putting more widgets on top of more layouts in my application, the space where I design the GUI is getting also bigger for the Qt-creator interface. I have many buttons and frames which are out of reach. I cannot see them (or click them, of…
McLan
  • 2,552
  • 9
  • 51
  • 85
0
votes
1 answer

Proper way to manually set the layout of a window in Qt

I need a QMainWindow layout to change depending on the number of cores. Therefore I set it manually (not using the Design mode). My question is: After this layout was created, how can I refer to the widgets it…
0
votes
0 answers

How to save image of application containing QGLWidget

I am looking for some example code that I can use to save an image of my Qt application. The application is a QMainWindow that contains a QGLWidget. I want to be able to screen capture all the GUIs (including the QGLWidget rendering) but have not…
0
votes
2 answers

Unable to acces a "def" in a sub window - "MainWindow object has no attribute 'updateTime' "

I've got a MainWindow where I call a subwindow (pop-up) from a pushbutton and I'm unable to access def updateTime(self) and it gives me an attribute error: AttributeError: 'MainWindow' object has no attribute 'updateTime' If I take out the…
user3723727
  • 142
  • 1
  • 4
  • 15
0
votes
2 answers

correct way to integrate GUI

I have a question that has been around my mind for a while. Lets say that I have designed my GUI with Qt designer, so I would have the .iu file that I would convert into .py file like this: pyuic4 mainGUI.ui -o mainGUI.py So now, If I do this I have…
codeKiller
  • 5,493
  • 17
  • 60
  • 115
0
votes
1 answer

How to catch a Signal from QMainWindow class by another thread on PySide?

I have a MainWindow class which have a Gui application running on it and i want that every time i click on a button from my application a signal is emitted and caught by another thread. There is my example code (sorry for not posting my real code…
0
votes
1 answer

PyQt Creating a QDialog inside a QMainWindow

i am learning PyQt and tried to put a QDialog inside a QMainWindow (to mix layouts). I just don't get why i have 2 separated windows instead of my Dialog inside the MainWindow. Tks in advance. #!/usr/bin/env python # -*- coding: utf-8 -*- import…
D0p
  • 1
  • 3