0

I'm learning PySide6 and I want to set the icon text for a QAction.

This is what I tried:

    button_action = QAction(self)
    button_action.setIcon(QIcon("chain--arrow.png"))
    button_action.setIconText("Chain") # This does not seem to work
    button_action.setShortcut('Ctrl+T')
    button_action.setStatusTip('Test application')
    button_action.setToolTip('Tooltip')
    button_action.triggered.connect(self.onMyToolBarButtonClick)
    button_action.setCheckable(True)

Is there something similar to setToolButtonStyle() method of QToolBotton() class for the QAction class?

enter image description here

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Filippo Boido
  • 1,136
  • 7
  • 11

0 Answers0