August 2018
Intermediate to advanced
534 pages
11h 21m
English
This generated class is a perfect yet simple example of Qt framework usage; we will dissect it together. As mentioned previously, the MainWindow.ui file describes your UI design and the MainWindow.h/MainWindow.cpp files define the C++ object where you can manipulate the UI with code.
It's important to take a look at the MainWindow.h header file. Our MainWindow object inherits from Qt's QMainWindow class:
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
As our class inherits from the QMainWindow class, we will have to add the corresponding #include at the top of the ...
Read now
Unlock full access