Results 1 to 3 of 3

Thread: windowIcon

  1. #1
    Join Date
    Dec 2010
    Location
    Lithuania
    Posts
    29
    Qt products
    Qt4
    Platforms
    Windows

    Default windowIcon

    hi, I am trying to add window title. But nothing happens.

    I added picture's file into the same folder as code files. I used only one code line.
    Qt Code:
    1. setWindowIcon(QIcon("icon.png"));
    To copy to clipboard, switch view to plain text mode 

    Maybe there has to be extra code used?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: windowIcon

    Can the application find the icon?

    You can try using the resource system.

  3. #3
    Join Date
    Dec 2010
    Location
    Lithuania
    Posts
    29
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: windowIcon

    Thanks. Resource system helped.

Similar Threads

  1. windowIcon in GraphicsView
    By gogodream in forum Qt Programming
    Replies: 3
    Last Post: 8th February 2010, 02:11
  2. Getting QWidget::windowIcon to work
    By graeme in forum Qt Tools
    Replies: 7
    Last Post: 2nd April 2006, 14:02

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.