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. Multi state Icons together with QIcon::fromTheme

Multi state Icons together with QIcon::fromTheme

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 262 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.
  • J Offline
    J Offline
    JulienMaille
    wrote on last edited by JulienMaille
    #1

    Hello,
    I'm trying to make use of the icon themes provided by Qt (works also well on Windows)
    It looks fine so far, except that I'm now trying to style some button that had different icons for their on and off states.

    Qt Designer won't let me insert more than one theme name.
    When building the icon manually with icon.addFile("...", QSize(), QIcon::Normal, QIcon::Off); I can only provide a QPixmap or a filename.
    Sounds stupid to load a QIcon with ::fromTheme, convert it to QPixmap and then call addFile.
    Also the theme change will not be reflected if done like this.

    Is there a solution to this issue?
    Are themes able to load an icon file that already contains the multistates?

    Bonus question: can we call these icons from stylesheets?
    Thanks a lot

    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