From 36d06a24cb063bcae9c574abce01096ef3c908a7 Mon Sep 17 00:00:00 2001 From: tianduanrui Date: Sat, 28 Jul 2018 22:28:19 +0800 Subject: [PATCH] add link QQt source test --- QQtExample_Temp.pro | 50 ++++++++++---------- multi-link | 2 +- test/LinkQQtSourceTest/LinkQQtSourceTest.pro | 45 ++++++++++++++++++ test/LinkQQtSourceTest/main.cpp | 11 +++++ test/LinkQQtSourceTest/mainwindow.cpp | 14 ++++++ test/LinkQQtSourceTest/mainwindow.h | 22 +++++++++ test/LinkQQtSourceTest/mainwindow.ui | 21 ++++++++ 7 files changed, 139 insertions(+), 26 deletions(-) create mode 100644 test/LinkQQtSourceTest/LinkQQtSourceTest.pro create mode 100644 test/LinkQQtSourceTest/main.cpp create mode 100644 test/LinkQQtSourceTest/mainwindow.cpp create mode 100644 test/LinkQQtSourceTest/mainwindow.h create mode 100644 test/LinkQQtSourceTest/mainwindow.ui diff --git a/QQtExample_Temp.pro b/QQtExample_Temp.pro index acddd582..317f44a1 100644 --- a/QQtExample_Temp.pro +++ b/QQtExample_Temp.pro @@ -1,25 +1,25 @@ -##----------------------------------------------------------------- -##LibQQt样例工程入口 -##不能随便编译,初始设置要求比较严格,请按照规程设置完整。 -##Example要编译,必须先编译完LibQQt -##本Library基于Multi-link技术,Example也是 -##Example工程也就是App工程和Library工程不能放在一起编译,否则会引发 first time bug (add_deploy_library_on_mac). -##Library工程组和App工程组分开编译,不会引发这个bug。 -##----------------------------------------------------------------- -TEMPLATE = subdirs -CONFIG += ordered - -SUBDIRS += test/colorwidgettest -#SUBDIRS += demo/QQtClientCreator -#SUBDIRS += demo/QQtServerCreator -#SUBDIRS += demo/QQtRoseMonitor -# -SUBDIRS += examples/exquisite -#SUBDIRS += test/voicetest -#SUBDIRS += test/giftest -#SUBDIRS += test/QQtCustomTitleBarMainFormTest - -#高级测试,谨慎使用。 -#SUBDIRS += test/singletonapptest -#SUBDIRS += test/namedpipetest -#SUBDIRS += test/sharedmemorytest +##----------------------------------------------------------------- +##LibQQt样例工程入口 +##不能随便编译,初始设置要求比较严格,请按照规程设置完整。 +##Example要编译,必须先编译完LibQQt +##本Library基于Multi-link技术,Example也是 +##Example工程也就是App工程和Library工程不能放在一起编译,否则会引发 first time bug (add_deploy_library_on_mac). +##Library工程组和App工程组分开编译,不会引发这个bug。 +##----------------------------------------------------------------- +TEMPLATE = subdirs +CONFIG += ordered + +#SUBDIRS += test/LinkQQtSourceTest +#SUBDIRS += test/colorwidgettest +#SUBDIRS += demo/QQtClientCreator +#SUBDIRS += demo/QQtServerCreator +#SUBDIRS += demo/QQtRoseMonitor +#SUBDIRS += examples/exquisite +#SUBDIRS += test/voicetest +#SUBDIRS += test/giftest +#SUBDIRS += test/QQtCustomTitleBarMainFormTest + +#高级测试,谨慎使用。 +#SUBDIRS += test/singletonapptest +#SUBDIRS += test/namedpipetest +#SUBDIRS += test/sharedmemorytest diff --git a/multi-link b/multi-link index d8126af2..8a3dad1b 160000 --- a/multi-link +++ b/multi-link @@ -1 +1 @@ -Subproject commit d8126af2eb1bc12816f73c01ac22b73d6bffcc62 +Subproject commit 8a3dad1b85b1eec64b555bfe1fab0a100ab2c6c9 diff --git a/test/LinkQQtSourceTest/LinkQQtSourceTest.pro b/test/LinkQQtSourceTest/LinkQQtSourceTest.pro new file mode 100644 index 00000000..358d69be --- /dev/null +++ b/test/LinkQQtSourceTest/LinkQQtSourceTest.pro @@ -0,0 +1,45 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2018-07-28T21:43:50 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = LinkQQtSourceTest +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.ui + +CONFIG += mobility +MOBILITY = + +include (../../multi-link/add_base_manager.pri) +add_version(1,0,0,0) +add_deploy() + +#不链接Library,而是include QQt.pri source +#add_dependent_manager(QQt) +include (../../QQt.pri) diff --git a/test/LinkQQtSourceTest/main.cpp b/test/LinkQQtSourceTest/main.cpp new file mode 100644 index 00000000..219ca126 --- /dev/null +++ b/test/LinkQQtSourceTest/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main ( int argc, char* argv[] ) +{ + QQtApplication a ( argc, argv ); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/test/LinkQQtSourceTest/mainwindow.cpp b/test/LinkQQtSourceTest/mainwindow.cpp new file mode 100644 index 00000000..12d07c01 --- /dev/null +++ b/test/LinkQQtSourceTest/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/test/LinkQQtSourceTest/mainwindow.h b/test/LinkQQtSourceTest/mainwindow.h new file mode 100644 index 00000000..29bb970d --- /dev/null +++ b/test/LinkQQtSourceTest/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/test/LinkQQtSourceTest/mainwindow.ui b/test/LinkQQtSourceTest/mainwindow.ui new file mode 100644 index 00000000..b72d0b45 --- /dev/null +++ b/test/LinkQQtSourceTest/mainwindow.ui @@ -0,0 +1,21 @@ + + MainWindow + + + + 0 + 0 + 800 + 480 + + + + MainWindow + + + + + + + +