Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Set icon next to window title[SOLVED]

Set icon next to window title[SOLVED]

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 10.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    ogopa
    wrote on last edited by
    #1

    I have an .jpg image that I want to place next to my QMainWindow title. how do I do this? Any help would be appreciated.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Try the "windowIcon":http://doc.qt.nokia.com/4.7/qwidget.html#windowIcon-prop property.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • O Offline
        O Offline
        ogopa
        wrote on last edited by
        #3

        Thanks, got it.
        The correct line is:
        @wave w; //where wave is my QMainWindow class
        w.setWindowIcon(QIcon("/image.jpg"));@

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved