[SOLVED] QAction don't show the icons
I have the problem, and previously i have tried to find a solution but can't solve the problem.
I found in the web, than the problem is the xubuntu used on my pc.
Then recomend me configure the gnome with:
gconftool-2 --type Boolean --set /desktop/gnome/interface/menus_have_icons True
but all are equall.
I have a doubt with where establish the files ".png" if it should be on "sources" or "Other Files".
I did put on "Other Files", but.... Is this correct?
it seems to had read that I should put it under source, if this is right, could you explain me, how do i put
the files ".png" under "source"?
the program is:
class AnotherMenu : public QMainWindow
AnotherMenu(QWidget *parent = 0);
#endif // ANOTHERMENU_H
QAction *newa = new QAction(newpix, "&New", this); QAction *open = new QAction(openpix, "&Open", this); QAction *quit = new QAction(quitpix, "&Quit", this); quit->setShortcut(tr("CTRL+Q")); QMenu *file; file = menuBar()->addMenu("&File"); file->addAction(newa); file->addAction(open); file->addSeparator(); file->addAction(quit); connect(quit, SIGNAL(triggered()), qApp, SLOT(quit()) );
int main(int argc, char *argv)
QApplication a(argc, argv);
AnotherMenu window; window.resize(550, 400); window.move(300, 300); window.setWindowTitle("Another Menu"); window.show(); return a.exec();
All function Ok, less appear the icons.
Thanks in advance
Are you sure your images are found ? Giving only the name of the file implies that they reside in the same folder as the application
When i start a project and in my case named : menus_toolbars2; Creator create two carpets:
When i pasted the 3 files ".png" in the carpet menus_toolbars, i did this initially; and compile/run the program, do not appear the icons in menus.
But When i pasted the 3 files ".png" in the second carpet, and compile/run the program, NOW already appear the icons in menus
Thanks Sgaist for help me