PDA

View Full Version : QSystemTrayIcon::showMessage



radojkod
4th December 2008, 14:13
Documentation is "very clear" about this and it says something like (in my words): in order to see notification messages caused by showMessage on Mac OS you should have Growl installed. Fine, my Growl shows all messages that have ASCII characters only. But, when it comes to show something more exotic (like German umlauts, or Cyrillic) it shows garbage.
Here is a code snippet:


QString msg;
msg = ui.lineEdit->text();
QMessageBox::information(this, "Info", msg); // shows msg correctly
trayIcon->showMessage("Info", msg); // doesn't show msg correctly

The problem is that messageBox displays all msg characters correctly, but Growl notification window shows garbage when it comes to anything else but ASCII. Of coure, this is the problem only on Mac OS X, while on Windows and Linux everything works fine without modifications.
I have tried with QTextCodec UTF-8, UTF-16 (BE and LE), with toLocal8Bit() and I had no success. Can someone point out, what has to be done in order to make Growl work with
QSystemTrayIcon::showMessage and Unicode characters?