PDA

View Full Version : QMessageBox missing icon


zanth
12th April 2008, 07:35
Hi,

I'm brand new to Qt programming and of course to this forum. So, greetings one and all.

I am simply trying to display a QMessageBox but the "standard" icon is not showing. In its place is the default Mac Application icon (a sheet of paper with a pencil, brush, and ruler forming an 'A' for those familiar with Mac OSX).

Here is the very simple code snippet:
QMessageBox::warning((QWidget *)0, "Test", "Testing");

I also tried this code to manually load the icon with the same result:

QMessageBox qmbox;
qmbox.setIcon(QMessageBox::Warning);
qmbox.setText("Testing");
qmbox.exec();

However, if I change the code to use the "Critical" message icon (using either of the above 2 methods) the "Warning" message icon appears.

QMessageBox::Question and QMessageBox::Information behave the same as QMessageBox::Warning ... ie: no standard message icon is display. QMessageBox::NoIcon works properly and does not display any icon.

I am programming on Mac OSX using Qt 4.3.3

TIA

zanth
12th April 2008, 07:59
Hello again,

I just noticed that if I run the program from the command line using: -style Plastique , the icons now display properly as per their purpose (Info, Warning, etc).

Perhaps there is a bug with Qt's Mac OSX native "Aqua" implementation?