Results 1 to 2 of 2

Thread: Setting default icon for all windows / dialogs

  1. #1
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Setting default icon for all windows / dialogs

    Hi,

    I have used the following piece of code to set icon for main application windows :

    Qt Code:
    1. QApplication::setWindowIcon(QPixmap("images/configurator.png"));
    To copy to clipboard, switch view to plain text mode 

    I thought this would set all icons in my windows, but I still get the default qt icon appearing?

    Any help is appreciated.

    Regards,
    Steve

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Setting default icon for all windows / dialogs

    Are you sure the relative path is correct (check if the pixmap is not null)? Also make sure to call that method before you create any of the windows you want to have that default icon.

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.