summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qpushbutton_p.h
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2009-12-03 23:04:09 (GMT)
committerPierre Rossi <pierre.rossi@nokia.com>2009-12-04 18:43:37 (GMT)
commit8529a8cbb0c6404c758b5efc650186d740b0e09f (patch)
treed34ea445050b249573c006fde64dfbbc45178cab /src/gui/widgets/qpushbutton_p.h
parentf0bb9bc5b0f4c20536d6c77624bd148389b78c06 (diff)
downloadQt-8529a8cbb0c6404c758b5efc650186d740b0e09f.zip
Qt-8529a8cbb0c6404c758b5efc650186d740b0e09f.tar.gz
Qt-8529a8cbb0c6404c758b5efc650186d740b0e09f.tar.bz2
Fixes problem with QMenu when it's populated on the aboutToShow
When the menu is populated that late, if the menu is to go off-screen, then it is moved and ends up covering its originating button. Includes some code cleanup thanks to Thierry's tips. Reviewed-by: Gabriel Reviewed-by: Thierry
Diffstat (limited to 'src/gui/widgets/qpushbutton_p.h')
-rw-r--r--src/gui/widgets/qpushbutton_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/widgets/qpushbutton_p.h b/src/gui/widgets/qpushbutton_p.h
index f448027..2510e05 100644
--- a/src/gui/widgets/qpushbutton_p.h
+++ b/src/gui/widgets/qpushbutton_p.h
@@ -68,6 +68,10 @@ public:
defaultButton(false), flat(false), menuOpen(false), lastAutoDefault(false) {}
inline void init() { resetLayoutItemMargins(); }
+ static QPushButtonPrivate* get(QPushButton *b) { return b->d_func(); }
+#ifndef QT_NO_MENU
+ QPoint adjustedMenuPosition();
+#endif
void resetLayoutItemMargins();
void _q_popupPressed();
QDialog *dialogParent() const;