|
|||||||
| Qt Programming General Qt programming issues. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
Is there any way to retrieve the icon of a file given the file's pathname? In particular, I am attempting to retrieve an application's icon. I have been able to do this for Windows using SHGetFileInfo(), but my application needs to be cross-platform and this (obviously) won't work for Mac or Linux. I have also tried the following: Qt Code:
Any suggestions or thoughts on how I could do this would be most appreciated. (I'm using Qt 4.2.2) Thanks |
|
#2
|
|||
|
|||
|
Notice a missing escape character:
Qt Code:
__________________
J-P Nurmi |
|
#3
|
|||
|
|||
|
HI, following a topic - does anyone knows way to extract icons stored in dll's resources?
|
|
#4
|
||||
|
||||
|
|
| The following user says thank you to kernel_panic for this useful post: | ||
mchara (30th October 2007) | ||
|
#5
|
|||
|
|||
|
And once you start converting HICON to QIcon/QPixmap, notice convertHIconToPixmap() in src/gui/image/qpixmap_win.cpp
![]()
__________________
J-P Nurmi |
| The following user says thank you to jpn for this useful post: | ||
mchara (30th October 2007) | ||
|
#6
|
||||
|
||||
|
|
|
#7
|
|||
|
|||
|
Thanks, that answers all my questions in this topic.
|
|
#8
|
|||
|
|||
|
Dear all,
can anyone help me to save QIcon as an image file. Thanks in advance. |
|
#9
|
|||
|
|||
|
I'm not sure, because recently i had no time for programming private project(i got enough at work), but as far as i remember, i have made some changes in qt imageformat plugin for ico format taken from kde sources.
Kde had writing to ico files method in qt3 but after migration to qt 4 only ico reading was ported and writing method was commented and i reworked it (using some other open software as reference(i don't remember its name now) so it saves ico files in current version(of course it's limited implementation and it doesn't support all possible formats) http://downloads.sourceforge.net/gra...8&big_mirror=0 i hope it will work for you(i didn't tested in on any linux) CU
__________________
See GrEEn (Graphics Effects Environment) http://sourceforge.net/project/platf...roup_id=232746 a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats). |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mac application and the Dock Icon | sekelsenmat | Qt Programming | 3 | 26th September 2007 10:23 |
| translation file issue (files not included in .ts with lupdate) | BigDams | Qt Programming | 5 | 22nd September 2006 08:04 |
| [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files | mloskot | Installation and Deployment | 6 | 6th March 2006 10:28 |