Hi,

In the short QT-4.1.0 example below, I'm putting a QAction inside a QMenuBar.
It gets shown all right, but if I pause the mouse pointer above the QAction, its
Tooltip is not shown. I have no problems with tooltips on classes that inherit from
QWidget, but what is needed for a QAction's tooltip to be displayed?

/Joakim Rosqvist

Qt Code:
  1. #include <QApplication>
  2. #include <QMenuBar>
  3. #include <QAction>
  4.  
  5. int main( int argc, char **argv )
  6. {
  7. QApplication app( argc, argv );
  8. QMenuBar *bar = new QMenuBar();
  9. QAction *action = bar->addAction("my action");
  10. action->setToolTip("my tooltip");
  11.  
  12. bar->show();
  13.  
  14. return app.exec();
  15. }
To copy to clipboard, switch view to plain text mode