Results 1 to 1 of 1

Thread: QSystemTrayIcon::showMessage

  1. #1
    Join Date
    Nov 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QSystemTrayIcon::showMessage

    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:

    Qt Code:
    1. QString msg;
    2. msg = ui.lineEdit->text();
    3. QMessageBox::information(this, "Info", msg); // shows msg correctly
    4. trayIcon->showMessage("Info", msg); // doesn't show msg correctly
    To copy to clipboard, switch view to plain text mode 

    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?
    Last edited by jpn; 4th December 2008 at 17:07. Reason: missing [code] tags

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.