Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QtGui>
5
6class Widget : public QWidget
7{
8public:
9 Widget(QWidget *parent = nullptr);
10};
11
13 : QWidget(parent)
14{
18 list << "a" << "b" << "c";
19 model->setStringList(list);
21}
22
23int main(int argc, char *argv[])
24{
25 QApplication app(argc, argv);
27 widget.show();
28 return app.exec();
29}
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
\inmodule QtCore
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
void show()
Shows the widget and its child widgets.
Definition qwidget.cpp:7875
Widget(QWidget *parent=nullptr)
QOpenGLWidget * widget
[1]
int main()
[0]
QSqlQueryModel * model
[16]
QList< int > list
[14]
QApplication app(argc, argv)
[0]