Results 1 to 3 of 3

Thread: Is is possible to have Icons deternined at runtime?

  1. #1
    Join Date
    Nov 2009
    Location
    Laval, France
    Posts
    124
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Is is possible to have Icons deternined at runtime?

    As far as I understand, icons for buttons and toolbars are usually compiled into the program and so cannot be changed once the program is compiled.
    Please correct me if I am wrong.
    I'm hoping to develop a Qt Application with a toolbar whose buttons have icons that come from a list of bitmaps that are referenced in a text file which is read when the program starts up.
    Does this sound reasonable?

  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: Is is possible to have Icons deternined at runtime?

    Please correct me if I am wrong.
    You are wrong if you mean that the usage of the resources can not be determined in runtime.
    If you use a resource file, you can compile your resources in to your exe, but you can choose to use them at any time you like.
    You don't have to use a resource file, you can also load resources at runtime from external files.
    ==========================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.

  3. #3
    Join Date
    Nov 2009
    Location
    Laval, France
    Posts
    124
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Is is possible to have Icons deternined at runtime?

    Thanks,
    Good news, so I shall search the documentation for the word resource.

Similar Threads

  1. Replies: 1
    Last Post: 25th September 2010, 09:20
  2. RunTime Execution
    By hasnatzaidi in forum Newbie
    Replies: 3
    Last Post: 5th October 2009, 07:45
  3. Runtime Error
    By zawal in forum Qwt
    Replies: 10
    Last Post: 1st August 2009, 12:46
  4. runtime error
    By mickey in forum General Programming
    Replies: 1
    Last Post: 11th June 2006, 14:38
  5. runtime libraries?
    By fwohlfert in forum Newbie
    Replies: 1
    Last Post: 5th January 2006, 19:12

Tags for this Thread

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.