PermissionGate¶
Show/enable children by role (2.71).
import QWinUI3.Extras · src/extras/QWinUI3/Extras/PermissionGate.qml
Category: Other · Library: v3.56
Gallery: PermissionGate — src/gallery/pages/PermissionGatePage.qml
Python: same QML type after qwinui3.setup_engine() — Python API.
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 (case-insensitive) |
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.