Results 1 to 7 of 7

Thread: QToolButton will not display its icon

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QToolButton will not display its icon

    Quote Originally Posted by JimBrown View Post
    myToolButton->setIcon(QIcon(QString::fromUtf8("images/icon_xpm")));
    If that icon is stored in resources, try ":/images/icon_xpm", otherwise use an absolute path (QCoreApplication::applicationDirPath() might be useful).

  2. The following user says thank you to jacek for this useful post:

    JimBrown (9th March 2007)

Similar Threads

  1. Replies: 8
    Last Post: 18th March 2011, 11:27
  2. QSystemTrayIcon doesn't show icon ?
    By probine in forum Qt Programming
    Replies: 3
    Last Post: 25th January 2007, 19:17
  3. Problem with qtoolbutton
    By moowy in forum Qt Programming
    Replies: 1
    Last Post: 22nd September 2006, 13:30
  4. Displaying Icon
    By Seema Rao in forum Qt Programming
    Replies: 4
    Last Post: 9th February 2006, 20:43
  5. How to dispay an icon in the first column of QTreeView
    By yogeshm02 in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2006, 15:51

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.