diff options
Diffstat (limited to 'src/widgets/widgets/qlineedit_p.cpp')
-rw-r--r-- | src/widgets/widgets/qlineedit_p.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index e24cc8a03a..599ebce0ab 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -70,6 +70,12 @@ int QLineEditPrivate::xToPos(int x, QTextLine::CursorPosition betweenOrOn) const return control->xToPos(x, betweenOrOn); } +bool QLineEditPrivate::inSelection(int x) const +{ + x -= adjustedContentsRect().x() - hscroll + horizontalMargin; + return control->inSelection(x); +} + QRect QLineEditPrivate::cursorRect() const { return adjustedControlRect(control->cursorRect()); @@ -364,7 +370,7 @@ void QLineEditIconButton::startOpacityAnimation(qreal endValue) void QLineEditIconButton::updateCursor() { #ifndef QT_NO_CURSOR - setCursor(qFuzzyCompare(m_opacity, 1.0) || !parentWidget() ? QCursor(Qt::ArrowCursor) : parentWidget()->cursor()); + setCursor(qFuzzyCompare(m_opacity, qreal(1.0)) || !parentWidget() ? QCursor(Qt::ArrowCursor) : parentWidget()->cursor()); #endif } |