TaurusCommandButton in PanelDescription, icon issue
I'm trying to create a panel with a button that stops Pool. I want the button to have an icon, which is possible when you create a simple widget like this:
import sys
from taurus.external.qt import Qt
from taurus.qt.qtgui.application import TaurusApplication
from taurus.qt.qtgui.button import TaurusCommandButton
app = TaurusApplication(sys.argv)
panel = Qt.QWidget()
layout = Qt.QHBoxLayout()
panel.setLayout(layout)
button = TaurusCommandButton(command="Stop", icon="actions:gtk-stop.svg")
button.setModel("pool/sar3test/2")
layout.addWidget(button)
panel.show()
sys.exit(app.exec_())
I've tried to insert an icon in two ways. The first one (the commented one) causes initialization error
The latter doesn't throw an error, but it doesn't do anything either (there's just a button with no icon).
stop_button = PanelDescription(
"Stop all",
classname="taurus.qt.qtgui.button:TaurusCommandButton",
#icon="actions:gtk-stop.svg",
icon=QIcon("actions:gtk-stop.svg"),
widget_properties={"Command": "Stop"},
floating=False,
model="pool/sar3test/2",
)
Is it possible somehow to create a button with an icon in PanelDescription? Additionally: the command only works when the word "comman" is written title-cased, while for TaurusCommandButton it is lower-cased. Is this still ok?