sorry, works fine on my machine. Do you have compiled the png support probably and/or removed all the old files inclusive the MAKE file?
sorry, works fine on my machine. Do you have compiled the png support probably and/or removed all the old files inclusive the MAKE file?
I've made this little and simple test to show the error. And fails on my machine. I have Ubuntu 9.10-64 bit anb Qt SDK installed from "qt-sdk-linux-x86_64-commercial-2009.05.bin" file. It also installed QtCreator 1.3.0
I can show png files, in my app. I really do it, so it may not be png support. But if I try to show an icon as an action in a QMenu, a blank space is shown in place of the icon. Strange behaviour...
I attach an screenshot of what I mean. The top toolbar has the same actions used in the context menu. They're shown in the toolbar but not in the context menu.
That's what I would say. As you can see, the contextual menu, that has to show a plus sign can show it in a QToolBar's action, but not on QMenu's action ). Almost weird...
Yeah, I belief youit was just a guess since it works on my side: Kubuntu 9.10 with the open source variant of 2009.05.
Another guess is that maybe your application style does not set the icon. Try "./Test -style plastique" and see if the icons are shown.
If not I would open a bug. And if you have time, you fist can try the open source version and see if it is related to the commercial version.
jpujolf (18th December 2009)
OK, don't worry. I only was trying to explaion me better...
I tested, and it doesn't workAnother guess is that maybe your application style does not set the icon. Try "./Test -style plastique" and see if the icons are shown.
I will make a try, but I've opened a bug already, because it's clearly a bug.If not I would open a bug. And if you have time, you fist can try the open source version and see if it is related to the commercial version.
Does not break functionality but looses totally the look & feel of my application.
Thanks anyway !!
Last edited by jpujolf; 18th December 2009 at 07:56. Reason: reformatted to look better
Hi,
If you are using Qt 4.6, there is a new property on QAction named "iconVisibleInMenu"
Could be that....
I was thinking about that because I had the same problem.
It was OK with 4.5 but in 4.6, no more icons in the main menuBar, checking this property for each action in designer and recompiling it solved the problem.
Edit Maybe not linked with 4.6 but with the new version of QtCreator, as long as I install the complete SDK.
As yonnak said, is was "iconVisibleInMenu" property. Beginning at 4.6.0 version is set to false ( on 4.5.3 was set to true by default )
So is a behaviour change. I don't know why, but trolls decided to set this flag to false without advice.![]()
So changing ALL the places where i use a QAction solved the problem. Not nice, but is a workaround for me.
Anyway, the "BUG" is open, to obtain at least an explanation about this change...
Bookmarks