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. QIcon's looking a little fuzzy
Forum Updated to NodeBB v4.3 + New Features

QIcon's looking a little fuzzy

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k Views 2 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.
  • C Offline
    C Offline
    cuddlykittens11
    wrote on last edited by
    #1

    I added some QIcons to a bunch of QToolButton's in my app via a .qrc file. The images load up fine, but when I looked much closer at them, they appeared really semi fuzzy. They are tiny (18x18). Some of my other (placeholder) icons which are just XPM images (with only two colors, solid black and transparent) also are partially fuzzy. Does anyone have an idea why, or how I can fix this?

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

      Hi,

      IIRC the standard size for toolbar icons is 22x22; if you provided smaller icons Qt scales them to that size.
      Scaling makes the icons fuzzy.

      If I'm right you can do one of these:

      • use bigger icons
      • set the toolbar icon size to 18X18

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cuddlykittens11
        wrote on last edited by
        #3

        The QToolButtons don't live insdie a QToolBar, I don't want the user to move them around. Should I instead use a QPushButton then?

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cuddlykittens11
          wrote on last edited by
          #4

          Found a solution. QToolButton::setIconSize().

          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