PDA

View Full Version : What's This crashes on Mac OS X?



ypeels
31st October 2012, 03:38
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QDialog dialog;
dialog.setWhatsThis("what?");
return dialog.exec();
}


Steps to reproduce

Compile and run the application shown above
Press Shift+F1


Expected behavior
yellow box with "what?" is displayed

Observed behavior

Windows 7 x64: as expected
Ubuntu 10.04 x86: as expected (might have white font)
Mac OS 10.6.2: yellow box with "what" displays for a split second, then app crashes
crashes for both Qt 4.7.4 and 4.8.3




Am I missing something here?

Alternatively, short of recompiling from scratch with QT_NO_WHATSTHIS, is there any way to disable What's This for my entire application?

Thank you!!

ypeels
31st October 2012, 15:33
Alternatively, short of recompiling from scratch with QT_NO_WHATSTHIS, is there any way to disable What's This for my entire application?

It's ugly even as kludges go, but installing an event filter for Shift+F1 on the QApplication object seems to gets the job done...there's gotta be a better way, right?

http://doc.qt.digia.com/qt/eventsandfilters.html#event-filters