PDA

View Full Version : Getting file icon of big size



Hronom
11th October 2009, 19:51
Please help me, can't find problem solve...
I need get icon(image) of any file in windows. QFileIconProvider do this but i need extra big size like on screenshot (http://img208.imageshack.us/img208/3552/59509177.png). Please give me some code)))

Peppy
11th October 2009, 22:10
You need to add the ICON to your project by resources and calling:

QWidget::setWindowIcon(QIcon(":/icon.ico"));

But if you want large Icon you need to read this :
http://doc.trolltech.com/4.5/appicon.html#setting-the-application-icon-on-windows

Hronom
11th October 2009, 22:38
You need to add the ICON to your project by resources and calling:

QWidget::setWindowIcon(QIcon(":/icon.ico"));

But if you want large Icon you need to read this :
http://doc.trolltech.com/4.5/appicon.html#setting-the-application-icon-on-windows
No i dont need to add ICON to my project... I need GET ICON FROM ANY FILE IN WINDOWS

ChrisW67
12th October 2009, 00:59
No need to yell ;)

If the Qt class only gives you the "traditional" icons I would guess you need to use Windows (Vista+) specific code to extract the PNG-based 256x256 icon. The extraction of the resource should be standard MSDN fare. I don't know whether the icon is a standard PNG; if it is, Qt should be able to manipulate it just fine.

Hronom
12th October 2009, 15:54
No need to yell ;)

If the Qt class only gives you the "traditional" icons I would guess you need to use Windows (Vista+) specific code to extract the PNG-based 256x256 icon. The extraction of the resource should be standard MSDN fare. I don't know whether the icon is a standard PNG; if it is, Qt should be able to manipulate it just fine.
Sorry;)
I look on MSDN(winapi) and see that problem serious and dont find any work solve of problem. All icons what i get is max have 32x32 size

Hronom
14th October 2009, 22:34
Ok i find winapi code what i need http://pogopixels.com/blog/getting-the-48x48-or-256x256-icon-of-a-file-on-windows/ but i cant insert him into my app - many errors, please help!

axeljaeger
15th October 2009, 12:47
What kind of errors? We cannot help without precise description of the errors.