[Qt-interest] QMessageBox text invisible on OS X

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Nov 25 09:19:09 CET 2009


Florian Turck wrote on Wednesday, November 25, 2009 1:51 AM:

> ...
> QMessageBox::about(this, tr("About Application"), tr("The
> <b>Application</b> example demonstrates how to " "write modern GUI
> applications using Qt, with a menu bar, " "toolbars, and a status
> bar.")); 
> 
> I am using OS X 10.6.2 (Snow Leopard) and QT 4.5.2. As the compiler
> warns "Support for this version of Mac OS X is still preliminary" I

I quickly installed the pre-compiled "Qt SDK" (including Qt Creator and everything(tm), based on the latest Qt 4.5) just a few days back, also on my new Snow Leopard ("I now have a Mac! Horay!" Which direction was Cupertino again? I need to lay down and do my daily prayer soon ;), after having installed the Mac development tools.

I ran the Qt demos, but did not observe anything suspicious, such as blank text. But I must admit I did not pay special attention to message boxes yet.

That said, what happens if you leave away the tr() (translation) call? Simply a:

QMessageBox::about (this, "About Application", "The text", ...);

Could it be that your app is loading a translation *.qm file with empty translations maybe? Just to rule out the obvious... or are you really trying to run the Qt examples and get no text? (Your code snippet above actually suggests so)


Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list