feat: Repaint the skin of a custom control, and the painting is complete

MyStyle has completed, QStylePainter's inheritance rewrite has not yet started
This commit is contained in:
muli
2020-02-20 00:47:18 +08:00
parent 158deb7c80
commit 77115da29d
6 changed files with 303 additions and 11 deletions

View File

@@ -24,7 +24,8 @@
#
#-------------------------------------------------
QT += core gui
#xxxPrivate 继承 Q-xxxx-Private的话,是需要的添加 core-private有一些核心方法? 可能不开放)
QT += core gui core-private # 若是需要继承 widgets相关需要添加 widgets-private
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@@ -47,11 +48,14 @@ CONFIG += c++11
SOURCES += \
main.cpp \
widget.cpp \
mystyle.cpp
mystyle.cpp \
myswitchbutton.cpp
HEADERS += \
widget.h \
mystyle.h
mystyle.h \
myswitchbutton.h \
myswitchbutton_p.h
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin