Button

Button

Button controls trigger commands and actions.

Inheritance

UIGQPushButton extends the WidgetKit base widget behavior and wraps Qt push-button interaction with theme, icon, state, and serialization support.

QWidget
  └─ QPushButton
      └─ UIGQPushButton + IUIGQWidgetBase

Common APIs

Method Description Parameters Return
setText(const QString& text) Sets the visible label. text: button text. void
setIcon(const QString& iconPath) Sets an icon resource path. iconPath: Qt resource or file path. void
setThemeName(const QString& themeName) Applies a themed appearance. themeName: theme configuration name. void
setDrawBackground(bool drawBackground) Enables or disables background drawing for icon-only or transparent buttons. drawBackground: whether to paint the button background. void
setFadeEnabled(bool enabled) Enables or disables Hot/Normal fade feedback on the button. enabled: whether fade is enabled. void

Theme and Behavior

Keep command meaning in text or tooltip, and keep visual state in theme configuration. Page code should set business text, icon paths, enabled state, and click behavior; reusable colors, borders, radius, and state styles should stay in the theme layer.