mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
Support Qt4, compiled
This commit is contained in:
parent
e44361e6b7
commit
763ec1027c
@ -3,9 +3,9 @@ CONFIG += ordered
|
|||||||
|
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
SUBDIRS += src/qqt.pro
|
SUBDIRS += src/qqt.pro
|
||||||
SUBDIRS += examples/framelesshelperwidget
|
#SUBDIRS += examples/framelesshelperwidget
|
||||||
#SUBDIRS += examples/qqtframe
|
#SUBDIRS += examples/qqtframe
|
||||||
#SUBDIRS += examples/qqtframe2
|
SUBDIRS += examples/qqtframe2
|
||||||
#SUBDIRS += examples/animationframe
|
#SUBDIRS += examples/animationframe
|
||||||
#SUBDIRS += examples/cmdwidget
|
#SUBDIRS += examples/cmdwidget
|
||||||
#SUBDIRS += examples/qqtbluetoothfiletransferserver
|
#SUBDIRS += examples/qqtbluetoothfiletransferserver
|
||||||
|
@ -25,7 +25,7 @@ class QQTSHARED_EXPORT QQtCustomVerificationCode : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit QQtCustomVerificationCode(QWidget* parent = nullptr, quint16 width = 180, quint16 height = 50, quint8 count = 6);
|
explicit QQtCustomVerificationCode(QWidget* parent = 0, quint16 width = 180, quint16 height = 50, quint8 count = 6);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief generateOneCaptcha 生成一个验证码
|
* @brief generateOneCaptcha 生成一个验证码
|
||||||
|
@ -58,8 +58,11 @@ void QQtFramelessHelperPrivate::addDragWidget(QWidget* widget)
|
|||||||
void QQtFramelessHelperPrivate::checkPos()
|
void QQtFramelessHelperPrivate::checkPos()
|
||||||
{
|
{
|
||||||
QRect rectMustIn = parent->frameGeometry();
|
QRect rectMustIn = parent->frameGeometry();
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||||
QRect rectMustNotIn = rectMustIn.marginsRemoved(margins);
|
QRect rectMustNotIn = rectMustIn.marginsRemoved(margins);
|
||||||
|
#else
|
||||||
|
QRect rectMustNotIn = rectMustIn.adjusted(margins.left(), margins.top(), margins.right(), margins.bottom());
|
||||||
|
#endif
|
||||||
QPoint cursorPos = QCursor::pos();
|
QPoint cursorPos = QCursor::pos();
|
||||||
|
|
||||||
if (isMaximized ||
|
if (isMaximized ||
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include "qqt-local.h"
|
#include "qqt-local.h"
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ void QQtWebClient::authenticationRequired(QNetworkReply *r, QAuthenticator * a)
|
|||||||
|
|
||||||
void QQtWebClient::proxyAuthenticationRequired(QNetworkProxy p, QAuthenticator* a)
|
void QQtWebClient::proxyAuthenticationRequired(QNetworkProxy p, QAuthenticator* a)
|
||||||
{
|
{
|
||||||
pline() << p << a;
|
pline() << p.hostName() << a;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QQtWebClient::sslErrors(QNetworkReply* r, QList<QSslError> e)
|
void QQtWebClient::sslErrors(QNetworkReply* r, QList<QSslError> e)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
//import this struct will not build fail
|
//import this struct will not build fail
|
||||||
#include <QNetworkProxy>
|
#include <QNetworkProxy>
|
||||||
|
#include <qqt-qt.h>
|
||||||
#include <qqt-local.h>
|
#include <qqt-local.h>
|
||||||
|
|
||||||
class QQTSHARED_EXPORT QQtWebClient : public QNetworkAccessManager
|
class QQTSHARED_EXPORT QQtWebClient : public QNetworkAccessManager
|
||||||
|
@ -21,12 +21,17 @@ equals(QKIT_, macOS) {
|
|||||||
}
|
}
|
||||||
CONFIG += debug_and_release
|
CONFIG += debug_and_release
|
||||||
CONFIG += build_all
|
CONFIG += build_all
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): {
|
||||||
for (cc, CONFIG) {
|
for (cc, CONFIG) {
|
||||||
message($${TARGET} configed $${cc})
|
message($${TARGET} configed $${cc})
|
||||||
}
|
}
|
||||||
for (cc, DEFINES) {
|
for (cc, DEFINES) {
|
||||||
message($${TARGET} defined $${cc})
|
message($${TARGET} defined $${cc})
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
message ($${TARGET} configed $${CONFIG})
|
||||||
|
message ($${TARGET} defined $${DEFINES})
|
||||||
|
}
|
||||||
############
|
############
|
||||||
##install
|
##install
|
||||||
############
|
############
|
||||||
|
@ -78,6 +78,8 @@ greaterThan(QT_MAJOR_VERSION, 4): DEFINES += __QT5__
|
|||||||
#if you use qextserialport, open the annotation
|
#if you use qextserialport, open the annotation
|
||||||
#suggest: Qt5 use factory-packed, Qt4 use forming Qt5, extra use this.
|
#suggest: Qt5 use factory-packed, Qt4 use forming Qt5, extra use this.
|
||||||
#DEFINES += __QEXTSERIALPORT__
|
#DEFINES += __QEXTSERIALPORT__
|
||||||
|
#if compiler QtSerialPort module manual, note this line is a good idea.
|
||||||
|
lessThan(QT_MAJOR_VERSION, 5): DEFINES += __QEXTSERIALPORT__
|
||||||
contains (DEFINES, __QEXTSERIALPORT__) {
|
contains (DEFINES, __QEXTSERIALPORT__) {
|
||||||
#include ( $$PWD/network/qextserialport/qextserialport.pri )
|
#include ( $$PWD/network/qextserialport/qextserialport.pri )
|
||||||
CONFIG += thread
|
CONFIG += thread
|
||||||
@ -97,6 +99,8 @@ contains (DEFINES, __QEXTSERIALPORT__) {
|
|||||||
DEFINES += __CUSTOMPLOT__
|
DEFINES += __CUSTOMPLOT__
|
||||||
#if you use qtbluetooth, open this annotation
|
#if you use qtbluetooth, open this annotation
|
||||||
DEFINES += __BLUETOOTH__
|
DEFINES += __BLUETOOTH__
|
||||||
|
#if compiler QtBluetooth module manual, note this line is a good idea.
|
||||||
|
lessThan(QT_MAJOR_VERSION, 5): DEFINES -= __BLUETOOTH__
|
||||||
contains (DEFINES, __BLUETOOTH__) {
|
contains (DEFINES, __BLUETOOTH__) {
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += bluetooth
|
greaterThan(QT_MAJOR_VERSION, 4): QT += bluetooth
|
||||||
lessThan(QT_MAJOR_VERSION, 5): CONFIG += bluetooth
|
lessThan(QT_MAJOR_VERSION, 5): CONFIG += bluetooth
|
||||||
|
Loading…
x
Reference in New Issue
Block a user