diff --git a/examples/styling/jkqtpstyleplaintextedit.cpp b/examples/styling/jkqtpstyleplaintextedit.cpp index 6c06c8d8f9..b53f2cd9f2 100644 --- a/examples/styling/jkqtpstyleplaintextedit.cpp +++ b/examples/styling/jkqtpstyleplaintextedit.cpp @@ -277,11 +277,12 @@ void JKQTPStylePlainTextEdit::contextMenuEvent(QContextMenuEvent *event) act=new QAction(jkqtp_makeQColorIcon(jkqtp_String2QColor(colName)), colName); connect(act, &QAction::triggered, std::bind(std::mem_fn(&JKQTPStylePlainTextEdit::changeCurrentLineValueTo), this, act->text())); menuPal->addAction(act); +#if (QT_VERSION>=QT_VERSION_CHECK(5, 12, 0)) colName="placeholdertext"; act=new QAction(jkqtp_makeQColorIcon(jkqtp_String2QColor(colName)), colName); connect(act, &QAction::triggered, std::bind(std::mem_fn(&JKQTPStylePlainTextEdit::changeCurrentLineValueTo), this, act->text())); menuPal->addAction(act); - +#endif int trans; trans=100; colName=QString::number(trans)+"%"; act=new QAction(jkqtp_makeQColorIcon(QColor(0,0,255,(100-trans)*255/100)), colName); diff --git a/lib/jkqtcommon/jkqtpstringtools.cpp b/lib/jkqtcommon/jkqtpstringtools.cpp index fa820140b3..24597e6444 100644 --- a/lib/jkqtcommon/jkqtpstringtools.cpp +++ b/lib/jkqtcommon/jkqtpstringtools.cpp @@ -554,8 +554,9 @@ QColor jkqtp_lookupQColorName(const QString &color) { if (col=="norole") return QGuiApplication::palette().color(QPalette::NoRole); if (col=="tooltipbase") return QGuiApplication::palette().color(QPalette::ToolTipBase); if (col=="tooltiptext") return QGuiApplication::palette().color(QPalette::ToolTipText); +#if (QT_VERSION>=QT_VERSION_CHECK(5, 12, 0)) if (col=="placeholdertext") return QGuiApplication::palette().color(QPalette::PlaceholderText); - +#endif for (int i=0; i