QWidget2: Fix Qt 5.12 build
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
27be916e11
commit
a610c84a3c
|
@ -57,7 +57,7 @@ void ContentsWidget::paintEvent(QPaintEvent *event)
|
||||||
if (m_bShouldDrawWindowBorder) {
|
if (m_bShouldDrawWindowBorder) {
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
painter.save();
|
painter.save();
|
||||||
painter.setPen({Qt::black, 1.5});
|
painter.setPen({window()->isActiveWindow() ? Qt::black : Qt::darkGray, 1.5});
|
||||||
painter.drawLine(0, 0, width(), 0);
|
painter.drawLine(0, 0, width(), 0);
|
||||||
painter.drawLine(0, height(), width(), height());
|
painter.drawLine(0, height(), width(), height());
|
||||||
painter.drawLine(0, 0, 0, height());
|
painter.drawLine(0, 0, 0, height());
|
||||||
|
|
|
@ -26,6 +26,16 @@
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(5, 13, 0))
|
||||||
|
#define Q_DISABLE_MOVE(Class) \
|
||||||
|
Class(Class &&) = delete; \
|
||||||
|
Class &operator=(Class &&) = delete;
|
||||||
|
|
||||||
|
#define Q_DISABLE_COPY_MOVE(Class) \
|
||||||
|
Q_DISABLE_COPY(Class) \
|
||||||
|
Q_DISABLE_MOVE(Class)
|
||||||
|
#endif
|
||||||
|
|
||||||
class QGraphicsDropShadowEffect;
|
class QGraphicsDropShadowEffect;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
|
Loading…
Reference in New Issue