PushButton Class Reference
from PyKDE4.plasma import *
Inherits: QGraphicsProxyWidget → QGraphicsWidget → QObject
Namespace: Plasma
Detailed Description
PushButton plasma/widgets/pushbutton.h <Plasma/Widgets/PushButton>
Provides a plasma-themed KPushButton.
Signals |
| clicked () |
Methods |
| __init__ (self, QGraphicsWidget parent=0) |
| clicked (self) |
| hoverEnterEvent (self, QGraphicsSceneHoverEvent event) |
| hoverLeaveEvent (self, QGraphicsSceneHoverEvent event) |
QString | image (self) |
KPushButton | nativeWidget (self) |
| paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget=0) |
| resizeEvent (self, QGraphicsSceneResizeEvent event) |
| setImage (self, QString path) |
| setStyleSheet (self, QString stylesheet) |
| setText (self, QString text) |
QString | styleSheet (self) |
QString | text (self) |
Method Documentation
- Signal syntax:
QObject.connect(source, SIGNAL("clicked()"), target_slot)
- Returns:
- the image path being displayed currently, or an empty string if none.
- Returns:
- the native widget wrapped by this PushButton
Sets the path to an image to display.
@arg path the path to the image; if a relative path, then a themed image will be loaded.
setStyleSheet |
( |
self, |
|
|
|
QString |
stylesheet |
|
) |
|
|
|
Sets the stylesheet used to control the visual display of this PushButton
@arg stylesheet a CSS string
Sets the display text for this PushButton
@arg text the text to display; should be translated.
- Returns:
- the stylesheet currently used with this widget
- Returns:
- the display text