Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Qt icon - constant somewhere?

[SOLVED] Qt icon - constant somewhere?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 843 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    maximus
    wrote on last edited by
    #1

    Hi,

    I would like to include a "About Qt" menu in my App
    Similar to this one : https://www.dropbox.com/s/mdrnhsm27ehto04/aboutQt.png

    I was wondering, I remember when I had no icon for my QMainWindow, it showed the Qt icon, I guess the Qt icon is included somewhere in the code, I don't have to add a .png ressource? If so, what is the correct code to create the Qt icon ?

    Thank you!

    @QAction *actionHelpQT = menuHelp->addAction(QIcon(), tr("About Qt"));
    -->
    QAction *actionHelpQT = menuHelp->addAction(QIcon(Qt::QtIcon?), tr("About Qt"));@


    Free Indoor Cycling Software - https://maximumtrainer.com

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From a quick look in the sources you can try with:

      QPixmap pm(QLatin1String(":/qt-project.org/qmessagebox/images/qtlogo-64.png"));

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maximus
        wrote on last edited by
        #3

        Thanks!

        @QAction *actionHelpQT = menuAbout->addAction(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"), tr("About Qt"));@


        Free Indoor Cycling Software - https://maximumtrainer.com

        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