DisplayHint QML Type
Hints for implementations using Actions indicating preferences about how to display the action. More...
Import Statement: | import org.kde.kirigami.layouts |
Methods
- bool displayHintSet(DisplayHints hints, Hint hint)
(since 2.14)
- bool displayHintSet(QtObject hints, Hint hint)
Detailed Description
This is a singleton type.
Possible hint values are:
- NoPreference: Indicates there is no specific preference.
- IconOnly: Only display an icon for this Action
- KeepVisible: Try to keep the action visible even when space constrained. Mutually exclusive with AlwaysHide, KeepVisible has priority.
- AlwaysHide: If possible, hide the action in an overflow menu or similar location. Mutually exclusive with KeepVisible, KeepVisible has priority.
- HideChildIndicator: When this action has children, do not display any indicator (like a menu arrow) for this action.
Method Documentation
|
Helper function to check if a certain display hint has been set.
This function is mostly convenience to enforce certain behaviour of the various display hints, primarily the mutual exclusivity of KeepVisible and AlwaysHide.
values The display hints to check.
hint The display hint to check if it is set.
Return true
if the hint was set for this action, false if not.
This method was introduced in 2.14.
bool displayHintSet(QtObject hints, Hint hint) |
Check if a certain display hint has been set on an object.
This overloads displayHintSet(DisplayHints, Hint) to accept a QObject instance. This object is checked to see if it has a displayHint property and if so, if that property has hint set.
object The object to check.
hint The hint to check for.
Returns false
if object is null, object has no displayHint property or the hint was not set. true
if it has the property and the hint is set.