Results 1 to 2 of 2

Thread: Access icon from RC file

  1. #1
    Join Date
    Oct 2010
    Location
    Tijuana, Baja California, México
    Posts
    19
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Access icon from RC file

    Hi:

    How do you access the icon in a resource file to use it as Form's icon?

    // resource.rc
    IDI_MAIN DISCARDABLE "app.ico"

    I want to use IDI_MAIN to set it in setWindowIcon(), thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Access icon from RC file

    The doc is your friend:
    http://doc.qt.io/qt-5/resources.html
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2017, 07:49
  2. Replies: 2
    Last Post: 18th March 2016, 11:51
  3. Replies: 1
    Last Post: 3rd January 2016, 22:35
  4. Replies: 2
    Last Post: 18th October 2013, 18:16
  5. Replies: 0
    Last Post: 17th March 2010, 13:25

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.