|
@@ -97,7 +97,11 @@ QRect ctkSearchBoxPrivate::searchRect()const
|
|
|
// the frame line width
|
|
|
if (q->hasFrame())
|
|
|
{
|
|
|
+#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
|
|
QStyleOptionFrameV2 opt;
|
|
|
+#else
|
|
|
+ QStyleOptionFrame opt;
|
|
|
+#endif
|
|
|
q->initStyleOption(&opt);
|
|
|
sRect.adjust(opt.lineWidth, opt.lineWidth, -opt.lineWidth, -opt.lineWidth);
|
|
|
}
|
|
@@ -226,7 +230,11 @@ void ctkSearchBox::paintEvent(QPaintEvent * event)
|
|
|
QRect r = rect();
|
|
|
QPalette pal = palette();
|
|
|
|
|
|
+#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
|
|
QStyleOptionFrameV2 panel;
|
|
|
+#else
|
|
|
+ QStyleOptionFrame panel;
|
|
|
+#endif
|
|
|
initStyleOption(&panel);
|
|
|
r = this->style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
|
|
|
r.setX(r.x() + this->textMargins().left());
|