summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qlineedit_p.h')
-rw-r--r--src/widgets/widgets/qlineedit_p.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h
index bb1e6232c4..f26a4e32db 100644
--- a/src/widgets/widgets/qlineedit_p.h
+++ b/src/widgets/widgets/qlineedit_p.h
@@ -95,8 +95,11 @@ public:
bool shouldHideWithText() const;
void setHideWithText(bool hide);
- // m_wasHidden is true unless the button is fading out
- bool needsSpace() const { return m_wasHidden; }
+ bool needsSpace() const {
+ if (m_fadingOut)
+ return false;
+ return isVisibleTo(parentWidget());
+ }
#endif
protected:
@@ -120,7 +123,7 @@ private:
#if QT_CONFIG(animation)
bool m_hideWithText = false;
- bool m_wasHidden = false;
+ bool m_fadingOut = false;
#endif
};