Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    General and Desktop
    2
    8
    4523
    Loading More Posts
    • 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
      adnan last edited by

      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 Reply Quote 0
      • A
        andre last edited by

        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 Reply Quote 0
        • A
          adnan last edited by

          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 Reply Quote 0
          • A
            andre last edited by

            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 Reply Quote 0
            • A
              adnan last edited by

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

              1 Reply Last reply Reply Quote 0
              • A
                andre last edited by

                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 Reply Quote 0
                • A
                  adnan last edited by

                  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 Reply Quote 0
                  • A
                    adnan last edited by

                    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 Reply Quote 0
                    • First post
                      Last post