Questions tagged [qtgui]

QtGui module extends QtCore with GUI functionality. It has collection of classes useful for creating Qt based GUI applications

Prior to , the Qt GUI module was the monolithic container for all things relating to graphical user interfaces in Qt, and included the Qt widget set, the item views, the graphics view framework and also printing. Starting Qt 5, these classes have been moved to the Qt Widgets module. Printing has been moved to the Qt Print Support module. Please note that these modules can be excluded from a Qt installation.

If you use qmake to build your projects, Qt Gui is included by default.

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

539 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
2 answers

QComboBox::findData() always returns -1

I am trying to get the id of the record in the model from a QCombobox with findData(index), but when select a item, it retunrs -1. It has been working in another project, but this is the second one that doesn't work. Here's my code: modAnfi = new…
-1
votes
2 answers

QPixmap::save() returns successful, but yields no file

The docs say this should work: bool did=pixmap.save( "hoppy.png" ); qDebug("did is: %d",did); My logging returns 1 suggesting, as per docs, that the save was successful. However, no file appears on my drive. According to the docs, this save()…
johnbakers
  • 24,158
  • 24
  • 130
  • 258
-1
votes
2 answers

Qt linker errors: cannot find -lQtCored

A problem with a Qt *.pro file: TARGET = ProgName TEMPLATE = app CONFIG += console QT += core QT += gui LIBS += -LC:\\Qt\\4.8.5\\bin LIBS += -LC:\\Qt\\4.8.5\\lib LIBS += -LS:\\lib # LIBS += -lQtCored4 # not necessary # LIBS += -lQtCore4 #…
Pietro
  • 12,086
  • 26
  • 100
  • 193
-2
votes
1 answer

Refresh QTableWidget with new values

I have two forms - form1, form2. form1 has got a QTableWidget which reads and shows xml entries in folder. form2 is a dialog form, collect user data and save as xml. I need to implement the following: Pressing button1 in form2 save (this is working)…
tetra
  • 177
  • 3
  • 11
-2
votes
1 answer

Cannot build project from QT wiki: Unresolved external symbol

Error when attempting to build code I copy-pasted directly from the QT for beginners wiki page. error main.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl Window::Window(class QWidget *)" (??0Window@@QEAA@PEAVQWidget@@@Z)…
Corvus
  • 53
  • 9
-2
votes
2 answers

How to prevent cell editing after pushing header section item?

When I push horizontal header section item in QTableWidget the upper cell in this column becomes ready to be edited. How can I prevent it?
Ufx
  • 2,595
  • 12
  • 44
  • 83
-2
votes
2 answers

Can I use QtGui instead of glew/glfw/SDL library in Qt for OpenGL?

Read this(from the Qt website): https://i.stack.imgur.com/lZW45.jpg (http://doc.qt.io/qt-5/qtgui-module.html#details) It says that it provides OpenGLin it. So can i use QtGui class instead of glew/glfw/SDL library for OpenGLwork?
zxc cxz
  • 33
  • 2
-2
votes
1 answer

SIGNALs are not working in PySide

I wrote a simple application in Python and PySide. When I run it, SIGNALs are not working. The application starts without errors. from PySide.QtCore import * from PySide.QtGui import * import sys class Form(QDialog): def __init__(self,…
Romulus
  • 1,150
  • 3
  • 16
  • 26
-2
votes
2 answers

Qt How to compare a text from textEdit

I have two QTextEdit objects. In my first QTextEdit object, I have set the text. In my second QTextEdit object, I have to type in the text. I want to compare the two texts something like this: if(ui->textEdit2->toPlainText() ==…
Tr4in
  • 117
  • 1
  • 4
-2
votes
1 answer

How to convert image to matrix form in QtCreator?

I can displayed an image with Qt in a gui application.I want to obtain numeric(matrix) form of image, because I studied on image processing, but I cannot convert the displayed image to matrix form. I do not know what code is used. Can anyone help me…
-2
votes
1 answer

How to show output video of other application in Qt?

I am creating a GUI application in Qt. This application is to display output of a application X which is not related to Qt hence i cant integrate it. X will output a video . This video do not have a path since it is a real-time display of X…
Bavani
  • 329
  • 1
  • 3
  • 12
-3
votes
2 answers

How to use two or three button's logic in single button using CPP in QT

I am beginner as the developer in QT, Here is the task for the button D, below is the code for the buttons A,B and C. Need to write code for the button D, if we press button D, it should execute the operations of A, B and C buttons ( one after…
-3
votes
1 answer

Edit .txt file in QT

I have a txt file to configure settings of a serial device, which looks like this: `R ref, version, "config_ID", menu language, Power timeout (hours), Number of users R R1 1 "Template for setting parameters" ENGLISH …
user12662278
1 2 3
35
36