- All Implemented Interfaces:
QtObjectInterface,Cloneable
Used to describe the parameter necessary for drawing a menu item
Java wrapper for Qt class QStyleOptionMenuItem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumJava wrapper for Qt enumQStyleOptionMenuItem::CheckTypestatic enumJava wrapper for Qt enumQStyleOptionMenuItem::MenuItemType -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionfinal voidassign(QStyleOptionMenuItem arg__1) SeeQStyleOptionMenuItem::operator=(QStyleOptionMenuItem) final booleanchecked()Whether the menu item is checked or notThe type of checkmark of the menu itemclone()Creates and returns a copy of this object.final QFontfont()The font used for the menu item textfinal QIconicon()The icon for the menu itemfinal intThe maximum icon width for the icon in the menu itemfinal booleanWhether the menu as a whole has checkable items or notThe type of menu itemfinal QRectmenuRect()The rectangle for the entire menufinal voidset(QStyleOptionMenuItem arg__1) Deprecated.final voidsetChecked(boolean checked) Whether the menu item is checked or notfinal voidsetCheckType(QStyleOptionMenuItem.CheckType checkType) The type of checkmark of the menu itemfinal voidThe font used for the menu item textfinal voidOverloaded function forsetFont(io.qt.gui.QFont).final voidThe icon for the menu itemfinal voidOverloaded function forsetIcon(io.qt.gui.QIcon).final voidsetMaxIconWidth(int maxIconWidth) The maximum icon width for the icon in the menu itemfinal voidsetMenuHasCheckableItems(boolean menuHasCheckableItems) Whether the menu as a whole has checkable items or notfinal voidsetMenuItemType(QStyleOptionMenuItem.MenuItemType menuItemType) The type of menu itemfinal voidsetMenuRect(QRect menuRect) The rectangle for the entire menufinal voidsetTabWidth(int tabWidth) The reserved width for the menu item's shortcutfinal voidThe text for the menu itemfinal inttabWidth()The reserved width for the menu item's shortcutfinal Stringtext()The text for the menu itemMethods inherited from class io.qt.widgets.QStyleOption
assign, direction, fontMetrics, init, initFrom, palette, rect, set, setDirection, setFontMetrics, setPalette, setRect, setState, setState, setStyleObject, state, styleObject, toStringMethods inherited from class io.qt.QtObject
dispose, equals, isDisposed
-
Constructor Details
-
QStyleOptionMenuItem
public QStyleOptionMenuItem() -
QStyleOptionMenuItem
- Parameters:
other-
-
-
Method Details
-
assign
See
QStyleOptionMenuItem::operator=(QStyleOptionMenuItem) - Parameters:
arg__1-
-
setCheckType
The type of checkmark of the menu item
- Parameters:
checkType-
-
checkType
The type of checkmark of the menu item
- Returns:
-
setChecked
Whether the menu item is checked or not
- Parameters:
checked-
-
checked
Whether the menu item is checked or not
- Returns:
-
setFont
The font used for the menu item text
- Parameters:
font-
-
font
The font used for the menu item text
- Returns:
-
setIcon
The icon for the menu item
- Parameters:
icon-
-
icon
The icon for the menu item
- Returns:
-
setMaxIconWidth
The maximum icon width for the icon in the menu item
- Parameters:
maxIconWidth-
-
maxIconWidth
The maximum icon width for the icon in the menu item
- Returns:
-
setMenuHasCheckableItems
Whether the menu as a whole has checkable items or not
- Parameters:
menuHasCheckableItems-
-
setMenuItemType
The type of menu item
- Parameters:
menuItemType-
-
setMenuRect
The rectangle for the entire menu
- Parameters:
menuRect-
-
setTabWidth
The reserved width for the menu item's shortcut
- Parameters:
tabWidth-
-
tabWidth
The reserved width for the menu item's shortcut
- Returns:
-
setText
The text for the menu item
- Parameters:
text-
-
text
The text for the menu item
- Returns:
-
clone
Creates and returns a copy of this object.
See
QStyleOptionMenuItem::QStyleOptionMenuItem(QStyleOptionMenuItem) - Overrides:
clonein classQStyleOption
-
set
Deprecated.Useassign(io.qt.widgets.QStyleOptionMenuItem)instead. -
setFont
Overloaded function for
setFont(io.qt.gui.QFont). -
setIcon
Overloaded function for
setIcon(io.qt.gui.QIcon).
-
assign(io.qt.widgets.QStyleOptionMenuItem)instead.