19from PySide6
import QtGui, QtWidgets
24 self.setIcon(QtGui.QIcon(
":icons/other/about.svg"))
25 self.setTitle(
"HelloPython")
26 self.setToolTip(
"Hello Python")
31 return "hellopython-button"
34 return "HelloPython button"
37 self.
menu = QtWidgets.QMenu()
38 self.
menu.addAction(
"Hello Python",
lambda: print(
"clicked"))
39 self.
menu.popup(controller.callPopupPosition(self.
menu.sizeHint()))
40 self.
menu.aboutToHide.connect(controller.callPopupClosed)