Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved QRubberBand Stylesheet

    General and Desktop
    3
    4
    1303
    Loading More Posts
    • 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
      qtoptus last edited by

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

      Thanks.

      raven-worx 1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • raven-worx
          raven-worx Moderators @qtoptus last edited by raven-worx

          @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 Reply Quote 5
          • Q
            qtoptus last edited by

            That helped. Thank you.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post