File tree 5 files changed +68
-5
lines changed
5 files changed +68
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Program-xamples
2
2
3
- ζ΅θ―δΈδΈθ‘¨ζ
4
-
5
-
6
- θΏζ―δΈη³»εηη¨εΊζ¨‘η
3
+ θΏζ―δΈδΈͺdemoιεοΌιι’ζζζζ΄ηη代η η»ζοΌε―δ»₯η΄ζ₯ε€εΆη²θ΄΄ηι£η§οΌ
7
4
8
5
ζ―δΈͺεζ―ε―ΉεΊηδΏ‘ζ―ε¦δΈοΌ
9
-
6
+ 1.Dbusdemo δΈδΈͺιη¨δΊqtηD-bus
7
+ 2.plugindemo δΈδΈͺεΊδΊqtηζ仢代η η»ζ
8
+ 3.qglobalstaticdemo δΈδΈͺεΊδΊqtη Q_GLOBAL_STATIC εδΎη»ζ代η
Original file line number Diff line number Diff line change
1
+ #include " mainwindow.h"
2
+
3
+ #include < QApplication>
4
+
5
+ int main (int argc, char *argv[])
6
+ {
7
+ QApplication a (argc, argv);
8
+ MainWindow w;
9
+ w.show ();
10
+ return a.exec ();
11
+ }
Original file line number Diff line number Diff line change
1
+ #include " mainwindow.h"
2
+
3
+ MainWindow::MainWindow (QWidget *parent)
4
+ : QMainWindow(parent)
5
+ {
6
+ }
7
+
8
+ MainWindow::~MainWindow ()
9
+ {
10
+ }
11
+
Original file line number Diff line number Diff line change
1
+ #ifndef MAINWINDOW_H
2
+ #define MAINWINDOW_H
3
+
4
+ #include < QMainWindow>
5
+
6
+ class MainWindow : public QMainWindow
7
+ {
8
+ Q_OBJECT
9
+
10
+ public:
11
+ MainWindow (QWidget *parent = nullptr );
12
+ ~MainWindow ();
13
+ };
14
+ #endif // MAINWINDOW_H
Original file line number Diff line number Diff line change
1
+ QT += core gui
2
+
3
+ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
4
+
5
+ CONFIG += c++11
6
+
7
+ # The following define makes your compiler emit warnings if you use
8
+ # any Qt feature that has been marked deprecated (the exact warnings
9
+ # depend on your compiler). Please consult the documentation of the
10
+ # deprecated API in order to know how to port your code away from it.
11
+ DEFINES += QT_DEPRECATED_WARNINGS
12
+
13
+ # You can also make your code fail to compile if it uses deprecated APIs.
14
+ # In order to do so, uncomment the following line.
15
+ # You can also select to disable deprecated APIs only up to a certain version of Qt.
16
+ # DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
17
+
18
+ SOURCES += \
19
+ main.cpp \
20
+ mainwindow.cpp
21
+
22
+ HEADERS += \
23
+ mainwindow.h
24
+
25
+ # Default rules for deployment.
26
+ qnx: target.path = /tmp/ $${TARGET }/bin
27
+ else: unix :!android: target.path = /opt/ $${TARGET }/bin
28
+ !isEmpty (target.path ): INSTALLS += target
You canβt perform that action at this time.
0 commit comments