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. How to use icon theme if on/off states are required?

How to use icon theme if on/off states are required?

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

    Hello,

    I would like to use 2 icon themes (qrc) in my app.

    This works fine for single icons, but how does it work with icons where the state like on/off is required?

    Via QtCreator you can only set an icon for a theme. The normal variant of setting an on/off icon individually does not work.

    Via stylesheet works

    qproperty-icon: url(":/icons/white/icon-on.svg") on, url(":/icons/white/icon-off.svg") off;
    

    but the hard-coded "white" url is of no use to me.

    On the internet there was talk of "theme_url" instead of only "url" which would make sense, but I can't find that in the documentation and it doesn't work either.

    So how does icon themes work with states?

    Thank you...

    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