Results 1 to 3 of 3

Thread: Icons in QToolButton

  1. #1
    Join Date
    Dec 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Icons in QToolButton

    Hi,

    Sorry for the newbie question - I am trying to set up QToolButtons in Designer and everything seems very straightforward. The problem is that when I set up an image for the icon for the QToolButton it shows up in the preview in Designer but *does not* show up when I actually compile the application and run it. The QToolButtons are just blank.

    Any idea of what I might be doing wrong?

    The images are .png, BTW.

    Thanks in advance.

    Peter

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Icons in QToolButton

    most likely you gave relative paths. Have a look at the resource system of Qt. Use that and you won't have that problem anymore.

  3. #3
    Join Date
    Dec 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Icons in QToolButton

    Thanks! Worked like a charm.

Similar Threads

  1. QToolButton - doesn't change icons when pressed
    By walsha3000 in forum Qt Programming
    Replies: 1
    Last Post: 21st February 2010, 10:03
  2. setText in QToolButton ( qt4 )
    By joseph in forum Qt Programming
    Replies: 23
    Last Post: 5th July 2007, 10:26
  3. Need help with QToolButton
    By philipp1 in forum Qt Programming
    Replies: 12
    Last Post: 27th October 2006, 15:37
  4. Cannot hide QToolButton
    By munna in forum Qt Programming
    Replies: 3
    Last Post: 2nd October 2006, 09:41
  5. Need help with QToolButton
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 22nd April 2006, 14:55

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