PermissionGate¶
Show/enable children by role (2.71).
import QWinUI3.Extras · src/extras/QWinUI3/Extras/PermissionGate.qml
Category: Other · Library: v2.80
Gallery: PermissionGate — src/gallery/pages/PermissionGatePage.qml
Extends Item.
Example¶
PermissionGate {
currentRole: "viewer"
allowedRoles: ["admin", "editor"]
mode: "hide" // hide | disable
Button { text: qsTr("Delete") }
}
Notes¶
Declarative UX gate only — enforce authorization on the server / app model.
API¶
Properties¶
| Name | Type | Description |
|---|---|---|
currentRole |
string |
— |
allowedRoles |
var |
— |
mode |
string |
hide | disable |
allowed |
bool |
— |
contentData |
alias |
— |
Signals¶
No custom signals (use inherited signals from the base type).
Methods¶
No custom methods (use inherited methods from the base type).
Inherited from Item¶
Also available (base type / Qt Quick Controls):
width/heightvisibleanchors
Generated from module sources by scripts/generate_component_docs.py — do not edit by hand.