From 27a0ea7bfc494aad9e39b4e3704ad2ba2b0d34ca Mon Sep 17 00:00:00 2001 From: feiyangqingyun Date: Thu, 28 May 2020 14:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=95=B4=E4=BD=93pro?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E7=BB=9F=E4=B8=80=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=B0bin=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllInOne.pro | 38 ----------------------------- QWidgetDemo.pro | 46 +++++++++++++++++++++++++++++++++++ README.md | 13 +++++++--- bgdemo/bgdemo.pro | 21 +++++++--------- comtool/comtool.pro | 45 +++++++++++++++++----------------- dbpage/dbpage.pro | 31 +++++++++-------------- dbpage/main.cpp | 6 +++-- emailtool/emailtool.pro | 10 +++----- lightbutton/lightbutton.cpp | 3 ++- lineeditnext/lineeditnext.pro | 28 ++++++--------------- mouseline/mouseline.pro | 17 ++++++------- netserver/netserver.pro | 6 +---- nettool/nettool.pro | 30 ++++++++++------------- qwtdemo/qwtdemo.pro | 8 ++---- 14 files changed, 139 insertions(+), 163 deletions(-) delete mode 100644 AllInOne.pro create mode 100644 QWidgetDemo.pro diff --git a/AllInOne.pro b/AllInOne.pro deleted file mode 100644 index 9be741d..0000000 --- a/AllInOne.pro +++ /dev/null @@ -1,38 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += \ - battery \ - bgdemo \ - buttondefence \ - colorwidget \ - comtool \ - countcode \ - dbpage \ - devicesizetable \ - echartgauge \ - emailtool \ -# ffmpegdemo \ - flatui \ - framelesswidget \ - gifwidget \ - imageswitch \ - ipaddress \ - lightbutton \ - lineeditnext \ - lunarcalendarwidget \ - maskwidget \ - mouseline \ - movewidget \ - navbutton \ - netserver \ - nettool \ - ntpclient \ - pngtool \ - qwtdemo \ - savelog \ - saveruntime \ - screenwidget \ - styledemo \ - videopanel \ - videowidget \ -# vlcdemo \ - zhtopy diff --git a/QWidgetDemo.pro b/QWidgetDemo.pro new file mode 100644 index 0000000..8387152 --- /dev/null +++ b/QWidgetDemo.pro @@ -0,0 +1,46 @@ +TEMPLATE = subdirs +#定义了ordered表示子项目按照添加的顺序来编译 +CONFIG += ordered +SUBDIRS += lightbutton #高亮按钮控件 +SUBDIRS += movewidget #通用控件移动类 +SUBDIRS += flatui #模仿flatui类 +SUBDIRS += countcode #代码统计组件 +SUBDIRS += gifwidget #屏幕录制控件 +SUBDIRS += comtool #串口调试助手 +SUBDIRS += nettool #网络调试助手 +SUBDIRS += devicesizetable #硬盘容量控件 +SUBDIRS += styledemo #高仿PS黑色+扁平白色+淡蓝色风格主题 +SUBDIRS += navbutton #导航按钮控件 +SUBDIRS += videopanel #视频监控画面分割demo +SUBDIRS += framelesswidget #通用无边框拖动拉伸类 +SUBDIRS += ipaddress #IP地址输入控件 +SUBDIRS += bgdemo #无边框背景透明窗体 +SUBDIRS += dbpage #通用数据库翻页查询 +SUBDIRS += pngtool #PNG图片警告去除工具 +SUBDIRS += savelog #日志重定向输出类 +SUBDIRS += saveruntime #运行时间记录类 +SUBDIRS += colorwidget #颜色拾取器 +SUBDIRS += maskwidget #遮罩层窗体 +SUBDIRS += battery #电池电量控件 +SUBDIRS += lineeditnext #文本框回车焦点下移 +SUBDIRS += zhtopy #汉字转拼音 +SUBDIRS += qwtdemo #qwt的源码版本,无需插件,直接源码集成到你的项目即可 +SUBDIRS += buttondefence #通用按钮地图效果 +SUBDIRS += mouseline #鼠标定位十字线 +SUBDIRS += emailtool #邮件发送工具 +SUBDIRS += ntpclient #NTP服务器时间同步 +SUBDIRS += lunarcalendarwidget#农历控件 +SUBDIRS += videowidget #通用视频控件 +SUBDIRS += screenwidget #屏幕截图控件 +SUBDIRS += imageswitch #图片开关控件 + +#如果你电脑对应的Qt版本有webkit或者webengine组件可以自行打开 +#SUBDIRS += echartgauge #echart仪表盘含交互支持webkit及webengine +#ffmpegdemo默认提供的win的lib,如果是win可以自行打开 +#SUBDIRS += ffmpegdemo #视频流播放ffmpeg内核 +#vlcdemo默认提供的win的lib,如果是win可以自行打开 +#SUBDIRS += vlcdemo #视频流播放vlc内核 +#designer项目只支持Qt4,如果是Qt4可以自行打开 +#SUBDIRS += designer #QtDesigner4源码 + +SUBDIRS += netserver #网络中转服务器 diff --git a/README.md b/README.md index b69d7e9..c873a69 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ #### 一、目录说明 +1. **可以选择打开QWidgetDemo.pro一次性编译所有的,也可以进入到目录下打开pro进行编译** +2. **如果发现有些子项目没有加载请打开QWidgetDemo.pro仔细看里面的注释** +3. **编译好的可执行文件在源码下的bin目录** + | 编号 | 文件夹 | 描述 | | ------ | ------ | ------ | | 1 | lightbutton | 高亮按钮控件 | @@ -32,16 +36,17 @@ | 29 | lunarcalendarwidget | 农历控件 | | 30 | videowidget | 通用视频控件 | | 31 | screenwidget | 屏幕截图控件 | -| 32 | echartgauge | echart仪表盘含交互支持webkit及webengine | -| 33 | imageswitch | 图片开关控件 | +| 32 | imageswitch | 图片开关控件 | +| 33 | echartgauge | echart仪表盘含交互支持webkit及webengine | | 34 | ffmpegdemo | 视频流播放ffmpeg内核 | | 35 | vlcdemo | 视频流播放vlc内核 | -| 36 | netserver | 网络中转服务器 | -| 37 | designer | QtDesigner4源码 | +| 36 | designer | QtDesigner4源码 | +| 37 | netserver | 网络中转服务器 | ### 二、学习群 1. **Qt交流大会群 853086607(雨田哥)** 2. **Qt技术交流群 46679801(3000人群)** +3. **Qt进阶之路群 734623697(武威的涛哥)** ### 三、效果图 ![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/lightbutton.gif) diff --git a/bgdemo/bgdemo.pro b/bgdemo/bgdemo.pro index 5396028..e0cc918 100644 --- a/bgdemo/bgdemo.pro +++ b/bgdemo/bgdemo.pro @@ -8,16 +8,13 @@ QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = bgdemo -TEMPLATE = app +TARGET = bgdemo +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off - -SOURCES += main.cpp\ - widget.cpp - -HEADERS += widget.h - -FORMS += widget.ui - -RESOURCES += \ - rc.qrc +SOURCES += main.cpp +SOURCES += widget.cpp +HEADERS += widget.h +FORMS += widget.ui +RESOURCES += rc.qrc diff --git a/comtool/comtool.pro b/comtool/comtool.pro index f6ca6b5..082bd95 100644 --- a/comtool/comtool.pro +++ b/comtool/comtool.pro @@ -8,29 +8,30 @@ QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = comtool -TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj -DESTDIR = bin -RC_FILE = other/main.rc +TARGET = comtool +TEMPLATE = app +DESTDIR = $$PWD/../bin +RC_FILE = other/main.rc -SOURCES += main.cpp -HEADERS += head.h -RESOURCES += other/main.qrc -CONFIG += warn_off +SOURCES += main.cpp +HEADERS += head.h +RESOURCES += other/main.qrc +CONFIG += warn_off -include ($$PWD/api/api.pri) -include ($$PWD/form/form.pri) -include ($$PWD/qextserialport/qextserialport.pri) +INCLUDEPATH += $$PWD +INCLUDEPATH += $$PWD/api +INCLUDEPATH += $$PWD/form +INCLUDEPATH += $$PWD/qextserialport -INCLUDEPATH += $$PWD -INCLUDEPATH += $$PWD/api -INCLUDEPATH += $$PWD/form -INCLUDEPATH += $$PWD/qextserialport +include ($$PWD/api/api.pri) +include ($$PWD/form/form.pri) +include ($$PWD/qextserialport/qextserialport.pri) + +unix { +contains(arma7, DEFINES) { +INCLUDEPATH += /usr/local/openssl-1.0.2m-h3-gcc-4.9.2/include +LIBS += -L/usr/local/openssl-1.0.2m-h3-gcc-4.9.2/lib -lssl -lcrypto +LIBS += -L/usr/local/h3_rootfsv -lXdmcp +} +} -#INCLUDEPATH += /usr/local/openssl-1.0.2m-h3-gcc-4.9.2/include -#LIBS += -L/usr/local/openssl-1.0.2m-h3-gcc-4.9.2/lib -lssl -lcrypto -#LIBS += -L/usr/local/h3_rootfsv -lXdmcp diff --git a/dbpage/dbpage.pro b/dbpage/dbpage.pro index 1a9b953..273c568 100644 --- a/dbpage/dbpage.pro +++ b/dbpage/dbpage.pro @@ -8,26 +8,17 @@ QT += core gui sql greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = dbpage -TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj -DESTDIR = bin -PRECOMPILED_HEADER = head.h +TARGET = dbpage +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off -INCLUDEPATH += $$PWD -CONFIG += warn_off +SOURCES += main.cpp +SOURCES += dbpage.cpp +SOURCES += frmdbpage.cpp -SOURCES += \ - main.cpp \ - dbpage.cpp \ - frmdbpage.cpp +HEADERS += dbpage.h +HEADERS += frmdbpage.h +FORMS += frmdbpage.ui -HEADERS += \ - dbpage.h \ - frmdbpage.h - -FORMS += \ - frmdbpage.ui +INCLUDEPATH += $$PWD diff --git a/dbpage/main.cpp b/dbpage/main.cpp index 90570da..adf036e 100644 --- a/dbpage/main.cpp +++ b/dbpage/main.cpp @@ -1,6 +1,8 @@ #include "frmdbpage.h" -#include -#include +#include "qapplication.h" +#include "qtextcodec.h" +#include "qsqldatabase.h" +#include "qdebug.h" int main(int argc, char *argv[]) { diff --git a/emailtool/emailtool.pro b/emailtool/emailtool.pro index 9fdad7e..614ff60 100644 --- a/emailtool/emailtool.pro +++ b/emailtool/emailtool.pro @@ -10,18 +10,14 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = emailtool TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj -DESTDIR = bin - +DESTDIR = $$PWD/../bin CONFIG += warn_off + SOURCES += main.cpp SOURCES += frmemailtool.cpp HEADERS += frmemailtool.h FORMS += frmemailtool.ui -include ($$PWD/sendemail/sendemail.pri) +include ($$PWD/sendemail/sendemail.pri) INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD/sendemail diff --git a/lightbutton/lightbutton.cpp b/lightbutton/lightbutton.cpp index b8d1858..148e45a 100644 --- a/lightbutton/lightbutton.cpp +++ b/lightbutton/lightbutton.cpp @@ -2,10 +2,11 @@ #include "lightbutton.h" #include "qpainter.h" +#include "qpainterpath.h" #include "qevent.h" #include "qtimer.h" #include "qdebug.h" -#include + LightButton::LightButton(QWidget *parent) : QWidget(parent) { text = ""; diff --git a/lineeditnext/lineeditnext.pro b/lineeditnext/lineeditnext.pro index 3511465..9226c90 100644 --- a/lineeditnext/lineeditnext.pro +++ b/lineeditnext/lineeditnext.pro @@ -8,24 +8,12 @@ QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = lineeditnext -TEMPLATE = app +TARGET = lineeditnext +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off -# The following define makes your compiler emit warnings if you use -# any feature of Qt which as 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\ - widget.cpp - -HEADERS += widget.h - -FORMS += widget.ui +SOURCES += main.cpp +SOURCES += widget.cpp +HEADERS += widget.h +FORMS += widget.ui diff --git a/mouseline/mouseline.pro b/mouseline/mouseline.pro index 0244dcc..e887ff4 100644 --- a/mouseline/mouseline.pro +++ b/mouseline/mouseline.pro @@ -8,13 +8,12 @@ QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = mouseline -TEMPLATE = app +TARGET = mouseline +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off - -SOURCES += main.cpp\ - widget.cpp - -HEADERS += widget.h - -FORMS += widget.ui +SOURCES += main.cpp +SOURCES += widget.cpp +HEADERS += widget.h +FORMS += widget.ui diff --git a/netserver/netserver.pro b/netserver/netserver.pro index c1feade..eb24616 100644 --- a/netserver/netserver.pro +++ b/netserver/netserver.pro @@ -10,11 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = netserver TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj -DESTDIR = bin +DESTDIR = $$PWD/../bin RC_FILE = other/main.rc SOURCES += main.cpp diff --git a/nettool/nettool.pro b/nettool/nettool.pro index b76209b..b41c97f 100644 --- a/nettool/nettool.pro +++ b/nettool/nettool.pro @@ -8,23 +8,19 @@ QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = nettool -TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj -DESTDIR = bin -win32:RC_FILE = other/main.rc +TARGET = nettool +TEMPLATE = app +DESTDIR = $$PWD/../bin +RC_FILE = other/main.rc -SOURCES += main.cpp -HEADERS += head.h -RESOURCES += other/main.qrc -CONFIG += warn_off +SOURCES += main.cpp +HEADERS += head.h +RESOURCES += other/main.qrc +CONFIG += warn_off -include ($$PWD/api/api.pri) -include ($$PWD/form/form.pri) +INCLUDEPATH += $$PWD +INCLUDEPATH += $$PWD/api +INCLUDEPATH += $$PWD/form -INCLUDEPATH += $$PWD -INCLUDEPATH += $$PWD/api -INCLUDEPATH += $$PWD/form +include ($$PWD/api/api.pri) +include ($$PWD/form/form.pri) diff --git a/qwtdemo/qwtdemo.pro b/qwtdemo/qwtdemo.pro index 292d71b..3ab4645 100644 --- a/qwtdemo/qwtdemo.pro +++ b/qwtdemo/qwtdemo.pro @@ -1,10 +1,6 @@ TARGET = qwtdemo TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj -DESTDIR = bin +DESTDIR = $$PWD/../bin CONFIG += warn_off SOURCES += main.cpp @@ -12,6 +8,6 @@ SOURCES += frmmain.cpp FORMS += frmmain.ui HEADERS += frmmain.h -include ($$PWD/qwt/qwt.pri) +include ($$PWD/qwt/qwt.pri) INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD/qwt