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. Is it possible to implement this UI with qt checkbox qss?
Qt 6.11 is out! See what's new in the release blog

Is it possible to implement this UI with qt checkbox qss?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 543 Views 1 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    2a22be26-f359-4332-afaf-7cf842e1e23e-image.png

    Is it possible to implement this kind of checkbox UI in qss?
    The unchecked state has been implemented.
    Can I set the margin value when it is checked?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can use images for each state of your checkbox. See the documentation example.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      I 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        You can use images for each state of your checkbox. See the documentation example.

        I Offline
        I Offline
        IknowQT
        wrote on last edited by
        #3

        @SGaist

        Is it impossible without images?
        Thank you for answer.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can also subclass QCheckBox and do the painting yourself.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved