Results 1 to 7 of 7

Thread: Getting file icon of big size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Question Getting file icon of big size

    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. Please give me some code)))

  2. #2
    Join Date
    Oct 2009
    Posts
    70
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Getting file icon of big size

    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...con-on-windows

  3. #3
    Join Date
    Oct 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Getting file icon of big size

    Quote Originally Posted by Peppy View Post
    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...con-on-windows
    No i dont need to add ICON to my project... I need GET ICON FROM ANY FILE IN WINDOWS

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Getting file icon of big size

    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.

  5. #5
    Join Date
    Oct 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Getting file icon of big size

    Quote Originally Posted by ChrisW67 View Post
    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

  6. #6
    Join Date
    Oct 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Getting file icon of big size

    Ok i find winapi code what i need http://pogopixels.com/blog/getting-t...le-on-windows/ but i cant insert him into my app - many errors, please help!

  7. #7
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Getting file icon of big size

    What kind of errors? We cannot help without precise description of the errors.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Replies: 5
    Last Post: 5th August 2009, 17:32
  2. Getting mulitiple size file icons with QFileIconProvider
    By gmat4321 in forum Qt Programming
    Replies: 1
    Last Post: 19th March 2009, 13:41
  3. How to change Icon size in QMenu?
    By alex chpenst in forum Qt Programming
    Replies: 4
    Last Post: 3rd September 2008, 14:16
  4. set Icon to .app file
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 10th January 2007, 21:13
  5. tool bar icon size looking small???
    By darpan in forum Qt Tools
    Replies: 7
    Last Post: 31st March 2006, 16:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.