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

This commit is contained in:
feiyangqingyun
2020-05-28 14:11:26 +08:00
parent 87f5267b42
commit d26b2ed6fb
20 changed files with 142 additions and 135 deletions

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,7 @@
#### 一、目录说明
**可以选择打开QWidgetDemo.pro一次性编译所有的也可以进入到目录下打开pro进行编译**
**如果发现有些子项目没有加载请打开QWidgetDemo.pro仔细看里面的注释**
**编译好的可执行文件在源码下的bin目录**
| 编号 | 文件夹 | 描述 |
| ------ | ------ | ------ |
| 1 | lightbutton | 高亮按钮控件 |
@@ -32,16 +35,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://github.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/lightbutton.gif)

View File

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

View File

@@ -10,11 +10,7 @@ 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
DESTDIR = $$PWD/../bin
RC_FILE = other/main.rc
SOURCES += main.cpp
@@ -22,15 +18,20 @@ 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 += /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
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
}
}

View File

@@ -10,24 +10,15 @@ 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
INCLUDEPATH += $$PWD
DESTDIR = $$PWD/../bin
CONFIG += warn_off
SOURCES += \
main.cpp \
dbpage.cpp \
frmdbpage.cpp
SOURCES += main.cpp
SOURCES += dbpage.cpp
SOURCES += frmdbpage.cpp
HEADERS += \
dbpage.h \
frmdbpage.h
HEADERS += dbpage.h
HEADERS += frmdbpage.h
FORMS += frmdbpage.ui
FORMS += \
frmdbpage.ui
INCLUDEPATH += $$PWD

View File

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

View File

@@ -96,14 +96,12 @@ void DeviceSizeTable::load()
{
//清空原有数据
int row = this->rowCount();
for (int i = 0; i < row; i++) {
this->removeRow(0);
}
#ifdef Q_OS_WIN
QFileInfoList list = QDir::drives();
foreach (QFileInfo dir, list) {
QString dirName = dir.absolutePath();
LPCWSTR lpcwstrDriver = (LPCWSTR)dirName.utf16();
@@ -117,7 +115,6 @@ void DeviceSizeTable::load()
QString all = QString::number((double) liTotalBytes.QuadPart / GB, 'f', 1);
all += "G";
int percent = 100 - ((double)liTotalFreeBytes.QuadPart / liTotalBytes.QuadPart) * 100;
insertSize(dirName, use, free, all, percent);
}
}
@@ -220,13 +217,11 @@ void DeviceSizeTable::checkSize(const QString &result, const QString &name)
for (int i = 0; i < list.count(); i++) {
QString s = list.at(i).trimmed();
if (s == "") {
continue;
}
index++;
if (index == 1) {
dev = s;
} else if (index == 2) {

View File

@@ -10,13 +10,9 @@ 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

View File

@@ -15,7 +15,6 @@ extern "C" {
#include "libavutil/ffversion.h"
#include "libavcodec/avcodec.h"
#include "libswscale/swscale.h"
#include "libavformat/avformat.h"
#include "libavfilter/avfilter.h"

View File

@@ -2,6 +2,7 @@
#include "lightbutton.h"
#include "qpainter.h"
#include "qpainterpath.h"
#include "qevent.h"
#include "qtimer.h"
#include "qdebug.h"

View File

@@ -10,22 +10,10 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
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
SOURCES += main.cpp
SOURCES += widget.cpp
HEADERS += widget.h
FORMS += widget.ui

View File

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

View File

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

View File

@@ -10,21 +10,17 @@ 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
DESTDIR = $$PWD/../bin
RC_FILE = other/main.rc
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
include ($$PWD/api/api.pri)
include ($$PWD/form/form.pri)

View File

@@ -13,7 +13,7 @@
#include "qwt_painter.h"
#include <qapplication.h>
#include <qpainter.h>
#include <QPainterPath>
#if QT_VERSION < 0x040601
#define qFastSin(x) qSin(x)
#define qFastCos(x) qCos(x)

View File

@@ -16,7 +16,7 @@
#include <qpixmap.h>
#include <qpainterpath.h>
#include <qmath.h>
#include <QPainterPath>
static bool qwtHasScalablePen( const QPainter *painter )
{
const QPen pen = painter->pen();

View File

@@ -10,7 +10,7 @@
#include "qwt_null_paintdevice.h"
#include <qpaintengine.h>
#include <qpixmap.h>
#include <QPainterPath>
class QwtNullPaintDevice::PrivateData
{
public:

View File

@@ -17,7 +17,7 @@
#include <qpen.h>
#include <qline.h>
#include <qpalette.h>
#include <QPainterPath>
class QPainter;
class QBrush;
class QColor;

View File

@@ -15,7 +15,7 @@
#include <qpixmap.h>
#include <qimage.h>
#include <qpolygon.h>
#include <QPainterPath>
class QPainterPath;
/*!

View File

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