1
votes

I'm using the newest Qt 4.5 and I'm creating my GUI with Qt Creator. My tab widget looks fine in the Creator, with all icons displayed. However, when I compile it and run it, there are no icons, but the tabs are wider than they are which indicates something, obviously. I tried both .png and .ico formats, none work. The size of icons is 16x16, exactly as the maximum tab icon size property.

The stylesheet to the tab control is not applied (nor there is any), except the 'general style' which is 'clearlooks'.

3

3 Answers

2
votes

Your icons probably can't be found by your executable. Try embedding them using the Qt resource system, this is how they are usually distributed.

Otherwise you need to check your paths are correct from whatever working directory you are running the executable from.

2
votes

im making a app with pyqt. and if i "compile" it i need to include the imageformats\qico4.dll in the imageformats subfolder. hope it helps :)

1
votes

Maybe you have to put the icons near your binary file? Or you can place your resource directory near your binary file.

If you are using Windows, you can check with Filemon if it finds the icons?