QPushButton



  • Hi!

    QT:
    Mit welcher Methode/Slot ändert man den enabled/disabled (kann geklickt werden und nicht; an/aus;;; Ihr wisst was ich meine!? 🙂 ) Zustand eines QPushButton?

    danke!

    MFG fsd.



  • Ohne mich super auszukennen, tippe ich mal auf den Slot setEnabled(true);

    cu



  • void QWidget::setEnabled ( bool enable ) [virtual slot]
    Enables widget input events if enable is TRUE, otherwise disables input events.

    An enabled widget receives keyboard and mouse events; a disabled widget does not. Note that an enabled widget receives keyboard events only when it is in focus.

    Some widgets display themselves differently when they are disabled. For example a button might draw its label grayed out. If your widget needs to know when it becomes enabled or disabled, you can reimplement the enabledChange() function.

    Disabling a widget implicitely disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled.

    See also isEnabled(), isEnabledTo(), QKeyEvent, QMouseEvent and enabledChange().



  • oh, ja. 😮
    Danke!

    MFG fsd.


Anmelden zum Antworten