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] Is there any way to use other standard pixmaps other than in QStyle class
QtWS25 Last Chance

[SOLVED] Is there any way to use other standard pixmaps other than in QStyle class

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 4.9k 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.
  • A Offline
    A Offline
    adnan
    wrote on last edited by
    #1

    I want to add zoom in and zoom out icons in the tool bar and i want my app to use system icons, but there are no standard pixmaps for zooming in QStyle. Plz help!

    @QIcon zoomIn_icon= ui->mainToolBar->style()->standardIcon(QStyle::SP_"what to use");@

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      If the images are not available through QStyle, I don't think they are available in another way as standard pixmaps, at least not via Qt. What OS are you targeting? On the Linux desktop, there are open desktop standards I believe that may help you find a standard icon.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adnan
        wrote on last edited by
        #3

        Thanks for replying.
        I use Ubuntu. Actually, Qt Assistant can replace almost all its icons with the system theme icons. Even icons for zooming get changed by changing icon theme. It is obvious Qt Assistant is written in Qt, so if Qt Assistant can do it , then most probably Qt should also. And if it doesn't plz throw some light on open desktop standards. How can these standards be integrated into Qt app.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Well, you have the source code for Assistant, so if you say Assistant can do it, then perhaps you have a place to start to find out how it does it...

          1 Reply Last reply
          0
          • A Offline
            A Offline
            adnan
            wrote on last edited by
            #5

            Where from can i get the source of Qt Assistant, can you plz post the link:

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              At the top of this site, you see a big header called "Downloads". You might be able to find, well, downloads there. There is a download there for the sources, and those sources include Assistant.

              So, I guess the link would be: http://qt-project.org

              1 Reply Last reply
              0
              • A Offline
                A Offline
                adnan
                wrote on last edited by
                #7

                I couldn't find source code of Qt Assistant. But Qt Creator also uses some non-standard pixmaps. I checked the code but it seems it has been developed using Qt Quick. So I couldn't figure out much. Can you throw some light on open desktop standards

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  adnan
                  wrote on last edited by
                  #8

                  I got it.

                  @QIcon rotate_c_icon = QIcon::fromTheme("object-rotate-right");@

                  The string name for icon should be used as mentioned in the following site:

                  http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html

                  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