Icon on the menu of Qaction not showing up. [ Solved ]
-
See screenshot and you will understand..
!http://oi55.tinypic.com/2071i06.jpg(Screen)!That's because there isn't any seticonvisible option
Any ideas? -
I have set it via the Qt Designer.
!http://oi56.tinypic.com/29qi0ya.jpg(Screen)!
But as i said there isn't any seticonvisible option...
-
The same with this
ui>menuHere_no_icon_is_been_shown>setIcon(QIcon(":/icons/Icons/button_blue_fastforward.png"));If you want download example project-> http://dl.dropbox.com/u/11379868/example.zip
-
Did you add the icons to the resource file of the project?
-
See clementine screenshot.
!http://oi54.tinypic.com/i3cvpu.jpg(Screen)!So Andre what i want, is used in other programs.. ( + Clementine is a qt app )
Volker yes the icons are on the resource file..
Again If you want download example project-> http://dl.dropbox.com/u/11379868/example.zip -
[quote author="Leon Vytanos" date="1298466699"]The same with this
ui>menuHere_no_icon_is_been_shown>setIcon(QIcon(":/icons/Icons/button_blue_fastforward.png"));
[/quote]Dude, reread my post and then fix to this:
@ui->menuHere_no_icon_is_been_shown->menuAction()->setIcon(QIcon(":/icons/Icons/button_blue_fastforward.png"));@ -
This is kind-of wrong:
@
ui->menuHere_no_icon_is_been_shown->menuAction()->setIconVisibleInMenu(1);
@this is better:
@
ui->menuHere_no_icon_is_been_shown->menuAction()->setIconVisibleInMenu(true);
@ -
1 and 0 are of type int
true and false are of type boolIt is casted the right way, yes, but it is considered bad style in C++ (in C you do not have a type bool, so 0/1 is ok there).