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
-1
votes
3 answers

Qt - Add two numbers

I can't get this to work. Anyone knows how to make it work? void MainWindow::on_pushButton_clicked() { int sum1 = ui->lineEdit->text().toInt(); int sum2 = ui->lineEdit_2->text().toInt(); ui->label_4->setText(sum1 + sum2); } Error:…
Giefdonut
  • 99
  • 1
  • 2
  • 10
-1
votes
1 answer

qt file menu with vertical separator to make recent column

I am new to Qt and trying to make a file menu which should have two column one with File, Save, Save etc and next column that shows recent file. It is similar like microsoft word 2007 have the file menu. I haven't found and vertical separator in…
Tab
  • 785
  • 2
  • 11
  • 27
-2
votes
1 answer

PyQt5: call method from first window in second window

I have two windows in this PyQt5 GUI application. I need to call a function in the first window from second window on button press event. ( I am using python 3.8.10 ) I just want to load data from excel when I press an insert button in the second…
ghost21blade
  • 731
  • 2
  • 8
  • 21
-2
votes
1 answer

How to call QMainWindow components from another class?

I need to call objects of a QMainWindow from another class but I can not find a way to make it work. This is a minimal example of the problem: import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel class Starter: def…
py-unicorn
  • 69
  • 8
-2
votes
1 answer

How can i stop a thread running in my Dialog Class from my mainWindow

My mainwindow looks like this it is a qlistwidget with some Job items, whenever any job item is clicked , it shows up the QDialogbox which looks like this. The QDialog has a listwidget and a show button, whenever the show button is clicked , a…
the_learnist
  • 69
  • 1
  • 8
-2
votes
1 answer

Qt Application launching but not responding

I finished migrating an application from Qt4 to Qt5, it compiles and runs but as soon as the main window is opened I cant do anything (interact with items, or click or anything). its just not responding. I tried debugging it but in the main.cpp…
Victor
  • 907
  • 2
  • 17
  • 42
1 2 3
34
35