1

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'.

4

3 回答 3

2

您的可执行文件可能无法找到您的图标。尝试使用Qt 资源系统嵌入它们,这就是它们通常的分布方式。

否则,您需要从运行可执行文件的任何工作目录检查您的路径是否正确。

于 2009-08-06T12:09:58.860 回答
2

我正在用 pyqt 制作一个应用程序。如果我“编译”它,我需要在 imageformats 子文件夹中包含 imageformats\qico4.dll。希望能帮助到你 :)

于 2011-02-02T20:33:32.890 回答
1

也许您必须将图标放在二进制文件附近?或者,您可以将资源目录放在二进制文件附近。

如果您使用的是 Windows,您可以检查 Filemon 是否找到图标?

于 2009-08-06T11:19:30.820 回答