0

I try this simple example (self is a QMainWindow) :

self.statusBar().showMessage('test') #checking if the statusBar is here and works
resetInterfaceAct = QAction('&Interface de Base', self)
resetInterfaceAct.setStatusTip('Remet l\'interface de base')
resetInterfaceAct.triggered.connect(self.interfaceStd)

menuBar = self.menuBar()
interfaceMenu = menuBar.addMenu('Interface')
interfaceMenu.addAction(resetInterfaceAct)

But when I pass my mouse over the Action, nothing happens in the statusBar. I'm coding on Ubuntu, and every example or video I looked, the code seems to be the same as I write it, but for me it don't works.

So any help will be great, thanks !

JB Tand
  • 11
  • 5
  • what is `interfaceStd`? – eyllanesc Jul 24 '18 at 10:11
  • In what part does the QAction modify the statusBar? – eyllanesc Jul 24 '18 at 10:12
  • toolbar is different a menubar and statusbar. – eyllanesc Jul 24 '18 at 10:12
  • You say *checking if the toolbar is here and works*, why are you saying if you are modifying the statusbar? – eyllanesc Jul 24 '18 at 10:13
  • so interfaceStd is a function in my class, the signal/slot worked perfectly, the QAction modify normally the statusbar by setStatusTip : This property holds the action's status tip The status tip is displayed on all status bars provided by the action's top-level parent widget. ( the definition of setStatusTip in QAction's documentation http://doc.qt.io/qt-5/qaction.html#statusTip-prop) – JB Tand Jul 24 '18 at 10:27
  • Futhermore the toolBar was only in the comment, the comment don't affect the code, and by reading the line it was clearly a typo – JB Tand Jul 24 '18 at 10:30

0 Answers0