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. QRubberBand Stylesheet
Qt 6.11 is out! See what's new in the release blog

QRubberBand Stylesheet

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.8k 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.
  • Q Offline
    Q Offline
    qtoptus
    wrote on last edited by
    #1

    How to style a QRubberBand? Does style-sheet work?

    Thanks.

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

      Hi,

      What styling do you have in mind ?

      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
      0
      • Q qtoptus

        How to style a QRubberBand? Does style-sheet work?

        Thanks.

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by raven-worx
        #3

        @qtoptus
        no. QRubberBand actually doesn't support styling via stylesheet. Just everything QWidget supports and that's not that much.

        You can only influence the color:

        QPalette palette;
        palette.setColor(QPalette::Active, QPalette::Highlight, QBrush(Qt::green));
        rubberBandWidget->setPalette(pal);
        

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        5
        • Q Offline
          Q Offline
          qtoptus
          wrote on last edited by
          #4

          That helped. 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