重新改进支持Qt4.6-Qt6.1

This commit is contained in:
feiyangqingyun
2021-05-30 15:45:43 +08:00
parent 71acdd7151
commit b2ca4d05da
286 changed files with 2571 additions and 1965 deletions

View File

@@ -3,7 +3,7 @@
#include <QtCore>
#include <QtGui>
#if (QT_VERSION > QT_VERSION_CHECK(5,0,0))
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
#include <QtWidgets>
#endif
@@ -20,9 +20,9 @@ public:
static IconFont *Instance();
explicit IconFont(QObject *parent = 0);
void setIcon(QLabel *lab, const QChar &icon, quint32 size = 12);
void setIcon(QAbstractButton *btn, const QChar &icon, quint32 size = 12);
QPixmap getPixmap(const QColor &color, const QChar &icon, quint32 size = 12,
void setIcon(QLabel *lab, int icon, quint32 size = 12);
void setIcon(QAbstractButton *btn, int icon, quint32 size = 12);
QPixmap getPixmap(const QColor &color, int icon, quint32 size = 12,
quint32 pixWidth = 15, quint32 pixHeight = 15,
int flags = Qt::AlignCenter);
@@ -38,7 +38,7 @@ public:
const QString &darkTextColor = "#FDFDFD");
//指定导航面板样式,带图标和效果切换
void setStyle(QWidget *widget, QList<QToolButton *> btns, QList<QChar> icons,
void setStyle(QWidget *widget, QList<QToolButton *> btns, QList<int> icons,
quint32 iconSize = 12, quint32 iconWidth = 15, quint32 iconHeight = 15,
const QString &type = "left", int borderWidth = 3,
const QString &borderColor = "#029FEA",
@@ -48,7 +48,7 @@ public:
const QString &darkTextColor = "#FDFDFD");
//指定导航按钮样式,带图标和效果切换
void setStyle(QFrame *frame, QList<QToolButton *> btns, QList<QChar> icons,
void setStyle(QFrame *frame, QList<QToolButton *> btns, QList<int> icons,
quint32 iconSize = 12, quint32 iconWidth = 15, quint32 iconHeight = 15,
const QString &normalBgColor = "#2FC5A2",
const QString &darkBgColor = "#3EA7E9",