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:
Alexander Volkov 2014-12-04 15:27:03 +03:00
parent cdbd68fc2f
commit c7ac077128
2 changed files with 6 additions and 4 deletions

View File

@ -1842,10 +1842,12 @@ QStyleOptionMenuItem::QStyleOptionMenuItem(int version)
/*!
\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
and the shortcut. The default value is 0.
QMenu sets it to the width occupied by the widest shortcut among
all visible items within the menu.
The default value is 0.
*/

View File

@ -366,7 +366,7 @@ public:
QString text;
QIcon icon;
int maxIconWidth;
int tabWidth;
int tabWidth; // ### Qt 6: rename to reservedShortcutWidth
QFont font;
QStyleOptionMenuItem();