Doc: Fix description of QStyleOptionMenuItem::tabWidth
It is actually not the tab width but the width reserved for the menu item's shortcut. Change-Id: I801dff0c57256690f61c022156a80cf6ff530c43 Reviewed-by: Martin Smith <martin.smith@qt.io>
This commit is contained in:
parent
cdbd68fc2f
commit
c7ac077128
@ -1842,10 +1842,12 @@ QStyleOptionMenuItem::QStyleOptionMenuItem(int version)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\variable QStyleOptionMenuItem::tabWidth
|
\variable QStyleOptionMenuItem::tabWidth
|
||||||
\brief the tab width for the menu item
|
\brief the reserved width for the menu item's shortcut
|
||||||
|
|
||||||
The tab width is the distance between the text of the menu item
|
QMenu sets it to the width occupied by the widest shortcut among
|
||||||
and the shortcut. The default value is 0.
|
all visible items within the menu.
|
||||||
|
|
||||||
|
The default value is 0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ public:
|
|||||||
QString text;
|
QString text;
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
int maxIconWidth;
|
int maxIconWidth;
|
||||||
int tabWidth;
|
int tabWidth; // ### Qt 6: rename to reservedShortcutWidth
|
||||||
QFont font;
|
QFont font;
|
||||||
|
|
||||||
QStyleOptionMenuItem();
|
QStyleOptionMenuItem();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user