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 Research In Motion.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QApplication>
5#include <QMetaObject>
6#include <QMetaMethod>
7#include <QMetaProperty>
8#include <QDebug>
9#include "window.h"
10
12{
13}
14
16{
17}
18
19int main(int argc, char *argv[])
20{
21 QApplication app(argc, argv);
24 int expectedRevision = 0;
25 const QMetaObject *windowMetaObject = window.metaObject();
26 for (int i=0; i < windowMetaObject->methodCount(); i++)
27 if (windowMetaObject->method(i).revision() <= expectedRevision)
28 exposeMethod(windowMetaObject->method(i));
29 for (int i=0; i < windowMetaObject->propertyCount(); i++)
30 if (windowMetaObject->property(i).revision() <= expectedRevision)
31 exposeProperty(windowMetaObject->property(i));
33 window.show();
34 return app.exec();
35}
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...
\inmodule QtCore
Definition qmetaobject.h:19
\inmodule QtCore
[Window class with invokable method]
Definition window.h:11
int main()
[0]
void exposeProperty(const QMetaProperty &)
Definition main.cpp:15
void exposeMethod(const QMetaMethod &)
Definition main.cpp:11
QApplication app(argc, argv)
[0]
aWidget window() -> setWindowTitle("New Window Title")
[2]
\inmodule QtCore