Results 1 to 6 of 6

Thread: Windows & Visual Studio: associating icon to file type

  1. #1
    Join Date
    Feb 2009
    Posts
    45
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Windows

    Default Windows & Visual Studio: associating icon to file type

    My application is developed on Windows with QT 4.4.3 and Visual Studio 2008
    I want to associate a file type (.abc) with an icon (.png or .ico), how can I do this from Visual Studio or Qt?
    As a result all files of type .abc have the concerned icon next to their file names.

    Any pointers will be appreciated.
    Thanks.

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows & Visual Studio: associating icon to file type

    File type association is done by windows, not by VS or Qt. You should probably look into how you should fix this using windows or if you want to do it from your program, how you should handle the information in your windows registry (possibly using QSettings).

  3. #3
    Join Date
    Feb 2009
    Posts
    45
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Windows

    Default Re: Windows & Visual Studio: associating icon to file type

    I tried using the Setup project in Visual Studio. Here one can associate the file types to the icons and names.
    The solution built successfully, but I guess the file step is to do the associations in the registry.

    Can anyone tell me if I am heading in the right direction?

  4. #4
    Join Date
    Feb 2009
    Posts
    45
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Windows

    Default Re: Windows & Visual Studio: associating icon to file type

    Is there anyone who can help me with this?

    I need to know how to embed the icon into the .exe file.
    I tried using the Setup Project in Visual Studio, but it didn't do the job. Am I missing something?

    Thanks in advance.

  5. #5
    Join Date
    Feb 2009
    Posts
    45
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Windows

    Default Re: Windows & Visual Studio: associating icon to file type

    I figured this one out.
    Am posting the answer for others who might run into this issue in the future:

    In Visual Studio, need to open the executable (File/ Open/ File..), and add the icon's in the icon folder. Remember this needs to be done on the final .exe after the build is compiled and ready.

  6. #6
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows & Visual Studio: associating icon to file type

    Quote Originally Posted by qtUser500 View Post
    Is there anyone who can help me with this?

    I need to know how to embed the icon into the .exe file.
    I tried using the Setup Project in Visual Studio, but it didn't do the job. Am I missing something?

    Thanks in advance.
    Look at this

Similar Threads

  1. Qt 4 for Windows CE : Visual Studio 2005 integration
    By pscheven in forum Installation and Deployment
    Replies: 4
    Last Post: 20th March 2008, 08:36
  2. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  3. Replies: 4
    Last Post: 24th November 2007, 13:33
  4. Qt configure with msvc.net
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 11th June 2007, 08:17
  5. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.