Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Best Practices for Qt Creator icons

Best Practices for Qt Creator icons

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 3 Posters 711 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
    avalanste
    wrote on last edited by
    #1

    I'm currently working on a GUI at a desktop screen in 1920 x 1080, however, the png icons I have right now are of different scales ( 96 x 96, 500 x 500 e.t.c.) but they are resized as 25 x 25 buttons in the interface.

    The icons are displayed normally, but I noticed because of these different scales, certain icons especially those at 500 x 500 are pixelated when resized.

    I am thinking if there are any best practices out there where I can use a single scale (a one size fits all) with png icons and display them with sharpness especially for HDpi monitors.

    jsulmJ 1 Reply Last reply
    0
    • A avalanste

      I'm currently working on a GUI at a desktop screen in 1920 x 1080, however, the png icons I have right now are of different scales ( 96 x 96, 500 x 500 e.t.c.) but they are resized as 25 x 25 buttons in the interface.

      The icons are displayed normally, but I noticed because of these different scales, certain icons especially those at 500 x 500 are pixelated when resized.

      I am thinking if there are any best practices out there where I can use a single scale (a one size fits all) with png icons and display them with sharpness especially for HDpi monitors.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @avalanste You could use SVG, or you create several sets of your icons with different sizes.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      2
      • jsulmJ jsulm

        @avalanste You could use SVG, or you create several sets of your icons with different sizes.

        A Offline
        A Offline
        avalanste
        wrote on last edited by avalanste
        #3

        @jsulm Thanks so much!
        Is there a different set of code in C++ or python for using SVG files?
        Will SVG affect the memory of the product? (ie. causing it to lag or run slower than using png)

        jsulmJ 1 Reply Last reply
        0
        • A avalanste

          @jsulm Thanks so much!
          Is there a different set of code in C++ or python for using SVG files?
          Will SVG affect the memory of the product? (ie. causing it to lag or run slower than using png)

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @avalanste said in Best Practices for Qt Creator icons:

          Is there a different set of code in C++ or python for using SVG files?

          No, just use *.svg instead of *.png.
          I don't know whether SVG consumes considerably more memory, something you would need to check.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mnesarco
            wrote on last edited by
            #5

            You can use Font Icons, they are light, elegant, easy to use and there are many opensource icon libraries as FontAwesome, Bootstrap Icons, ...

            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