新增整体pro文件,统一生成文件到bin目录

master
feiyangqingyun 2020-05-28 14:19:20 +08:00
parent 559d71cfdf
commit 27a0ea7bfc
14 changed files with 139 additions and 163 deletions

View File

@ -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

46
QWidgetDemo.pro Normal file
View File

@ -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 #网络中转服务器

View File

@ -1,4 +1,8 @@
#### 一、目录说明 #### 一、目录说明
1. **可以选择打开QWidgetDemo.pro一次性编译所有的也可以进入到目录下打开pro进行编译**
2. **如果发现有些子项目没有加载请打开QWidgetDemo.pro仔细看里面的注释**
3. **编译好的可执行文件在源码下的bin目录**
| 编号 | 文件夹 | 描述 | | 编号 | 文件夹 | 描述 |
| ------ | ------ | ------ | | ------ | ------ | ------ |
| 1 | lightbutton | 高亮按钮控件 | | 1 | lightbutton | 高亮按钮控件 |
@ -32,16 +36,17 @@
| 29 | lunarcalendarwidget | 农历控件 | | 29 | lunarcalendarwidget | 农历控件 |
| 30 | videowidget | 通用视频控件 | | 30 | videowidget | 通用视频控件 |
| 31 | screenwidget | 屏幕截图控件 | | 31 | screenwidget | 屏幕截图控件 |
| 32 | echartgauge | echart仪表盘含交互支持webkit及webengine | | 32 | imageswitch | 图片开关控件 |
| 33 | imageswitch | 图片开关控件 | | 33 | echartgauge | echart仪表盘含交互支持webkit及webengine |
| 34 | ffmpegdemo | 视频流播放ffmpeg内核 | | 34 | ffmpegdemo | 视频流播放ffmpeg内核 |
| 35 | vlcdemo | 视频流播放vlc内核 | | 35 | vlcdemo | 视频流播放vlc内核 |
| 36 | netserver | 网络中转服务器 | | 36 | designer | QtDesigner4源码 |
| 37 | designer | QtDesigner4源码 | | 37 | netserver | 网络中转服务器 |
### 二、学习群 ### 二、学习群
1. **Qt交流大会群 853086607(雨田哥)** 1. **Qt交流大会群 853086607(雨田哥)**
2. **Qt技术交流群 46679801(3000人群)** 2. **Qt技术交流群 46679801(3000人群)**
3. **Qt进阶之路群 734623697(武威的涛哥)**
### 三、效果图 ### 三、效果图
![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/lightbutton.gif) ![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/lightbutton.gif)

View File

@ -8,16 +8,13 @@ QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = bgdemo TARGET = bgdemo
TEMPLATE = app TEMPLATE = app
DESTDIR = $$PWD/../bin
CONFIG += warn_off
SOURCES += main.cpp
SOURCES += main.cpp\ SOURCES += widget.cpp
widget.cpp HEADERS += widget.h
FORMS += widget.ui
HEADERS += widget.h RESOURCES += rc.qrc
FORMS += widget.ui
RESOURCES += \
rc.qrc

View File

@ -8,29 +8,30 @@ QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = comtool TARGET = comtool
TEMPLATE = app TEMPLATE = app
MOC_DIR = temp/moc DESTDIR = $$PWD/../bin
RCC_DIR = temp/rcc RC_FILE = other/main.rc
UI_DIR = temp/ui
OBJECTS_DIR = temp/obj
DESTDIR = bin
RC_FILE = other/main.rc
SOURCES += main.cpp SOURCES += main.cpp
HEADERS += head.h HEADERS += head.h
RESOURCES += other/main.qrc RESOURCES += other/main.qrc
CONFIG += warn_off CONFIG += warn_off
include ($$PWD/api/api.pri) INCLUDEPATH += $$PWD
include ($$PWD/form/form.pri) INCLUDEPATH += $$PWD/api
include ($$PWD/qextserialport/qextserialport.pri) INCLUDEPATH += $$PWD/form
INCLUDEPATH += $$PWD/qextserialport
INCLUDEPATH += $$PWD include ($$PWD/api/api.pri)
INCLUDEPATH += $$PWD/api include ($$PWD/form/form.pri)
INCLUDEPATH += $$PWD/form include ($$PWD/qextserialport/qextserialport.pri)
INCLUDEPATH += $$PWD/qextserialport
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

View File

@ -8,26 +8,17 @@ QT += core gui sql
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = dbpage TARGET = dbpage
TEMPLATE = app TEMPLATE = app
MOC_DIR = temp/moc DESTDIR = $$PWD/../bin
RCC_DIR = temp/rcc CONFIG += warn_off
UI_DIR = temp/ui
OBJECTS_DIR = temp/obj
DESTDIR = bin
PRECOMPILED_HEADER = head.h
INCLUDEPATH += $$PWD SOURCES += main.cpp
CONFIG += warn_off SOURCES += dbpage.cpp
SOURCES += frmdbpage.cpp
SOURCES += \ HEADERS += dbpage.h
main.cpp \ HEADERS += frmdbpage.h
dbpage.cpp \ FORMS += frmdbpage.ui
frmdbpage.cpp
HEADERS += \ INCLUDEPATH += $$PWD
dbpage.h \
frmdbpage.h
FORMS += \
frmdbpage.ui

View File

@ -1,6 +1,8 @@
#include "frmdbpage.h" #include "frmdbpage.h"
#include <QtGui> #include "qapplication.h"
#include <QtSql> #include "qtextcodec.h"
#include "qsqldatabase.h"
#include "qdebug.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

View File

@ -10,18 +10,14 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = emailtool TARGET = emailtool
TEMPLATE = app TEMPLATE = app
MOC_DIR = temp/moc DESTDIR = $$PWD/../bin
RCC_DIR = temp/rcc
UI_DIR = temp/ui
OBJECTS_DIR = temp/obj
DESTDIR = bin
CONFIG += warn_off CONFIG += warn_off
SOURCES += main.cpp SOURCES += main.cpp
SOURCES += frmemailtool.cpp SOURCES += frmemailtool.cpp
HEADERS += frmemailtool.h HEADERS += frmemailtool.h
FORMS += frmemailtool.ui FORMS += frmemailtool.ui
include ($$PWD/sendemail/sendemail.pri) include ($$PWD/sendemail/sendemail.pri)
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
INCLUDEPATH += $$PWD/sendemail INCLUDEPATH += $$PWD/sendemail

View File

@ -2,10 +2,11 @@
#include "lightbutton.h" #include "lightbutton.h"
#include "qpainter.h" #include "qpainter.h"
#include "qpainterpath.h"
#include "qevent.h" #include "qevent.h"
#include "qtimer.h" #include "qtimer.h"
#include "qdebug.h" #include "qdebug.h"
#include <QPainterPath>
LightButton::LightButton(QWidget *parent) : QWidget(parent) LightButton::LightButton(QWidget *parent) : QWidget(parent)
{ {
text = ""; text = "";

View File

@ -8,24 +8,12 @@ QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = lineeditnext TARGET = lineeditnext
TEMPLATE = app TEMPLATE = app
DESTDIR = $$PWD/../bin
CONFIG += warn_off
# The following define makes your compiler emit warnings if you use SOURCES += main.cpp
# any feature of Qt which as been marked as deprecated (the exact warnings SOURCES += widget.cpp
# depend on your compiler). Please consult the documentation of the HEADERS += widget.h
# deprecated API in order to know how to port your code away from it. FORMS += widget.ui
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

View File

@ -8,13 +8,12 @@ QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = mouseline TARGET = mouseline
TEMPLATE = app TEMPLATE = app
DESTDIR = $$PWD/../bin
CONFIG += warn_off
SOURCES += main.cpp
SOURCES += main.cpp\ SOURCES += widget.cpp
widget.cpp HEADERS += widget.h
FORMS += widget.ui
HEADERS += widget.h
FORMS += widget.ui

View File

@ -10,11 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = netserver TARGET = netserver
TEMPLATE = app TEMPLATE = app
MOC_DIR = temp/moc DESTDIR = $$PWD/../bin
RCC_DIR = temp/rcc
UI_DIR = temp/ui
OBJECTS_DIR = temp/obj
DESTDIR = bin
RC_FILE = other/main.rc RC_FILE = other/main.rc
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -8,23 +8,19 @@ QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = nettool TARGET = nettool
TEMPLATE = app TEMPLATE = app
MOC_DIR = temp/moc DESTDIR = $$PWD/../bin
RCC_DIR = temp/rcc RC_FILE = other/main.rc
UI_DIR = temp/ui
OBJECTS_DIR = temp/obj
DESTDIR = bin
win32:RC_FILE = other/main.rc
SOURCES += main.cpp SOURCES += main.cpp
HEADERS += head.h HEADERS += head.h
RESOURCES += other/main.qrc RESOURCES += other/main.qrc
CONFIG += warn_off CONFIG += warn_off
include ($$PWD/api/api.pri) INCLUDEPATH += $$PWD
include ($$PWD/form/form.pri) INCLUDEPATH += $$PWD/api
INCLUDEPATH += $$PWD/form
INCLUDEPATH += $$PWD include ($$PWD/api/api.pri)
INCLUDEPATH += $$PWD/api include ($$PWD/form/form.pri)
INCLUDEPATH += $$PWD/form

View File

@ -1,10 +1,6 @@
TARGET = qwtdemo TARGET = qwtdemo
TEMPLATE = app TEMPLATE = app
MOC_DIR = temp/moc DESTDIR = $$PWD/../bin
RCC_DIR = temp/rcc
UI_DIR = temp/ui
OBJECTS_DIR = temp/obj
DESTDIR = bin
CONFIG += warn_off CONFIG += warn_off
SOURCES += main.cpp SOURCES += main.cpp
@ -12,6 +8,6 @@ SOURCES += frmmain.cpp
FORMS += frmmain.ui FORMS += frmmain.ui
HEADERS += frmmain.h HEADERS += frmmain.h
include ($$PWD/qwt/qwt.pri) include ($$PWD/qwt/qwt.pri)
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
INCLUDEPATH += $$PWD/qwt INCLUDEPATH += $$PWD/qwt