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. Visual way for item selection

Visual way for item selection

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 710 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.
  • BlackMambaB Offline
    BlackMambaB Offline
    BlackMamba
    wrote on last edited by
    #1

    Hello,

    I want to draw a blue rectangle (in any form, qgraphicsitem for example) and being able to select/show selection on a part of it by painting the selected zone in another color, lets say yellow.
    I can retrieve the selection width by different methods (for example with drag/drop or by press/release by saving the coordinates values of these events).
    However, I need a "visual" way to show the selected zone, how do you think I could achieve that?
    The ugly way would probably be to draw another yellow rectangle on top of the blue rectangle and to update its width with events and update();
    However, I would like to do it a cleaner way, if possible.

    Cheers,

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

      Hi,

      Are you thinking about something like QRubberBand ?

      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
      • BlackMambaB Offline
        BlackMambaB Offline
        BlackMamba
        wrote on last edited by
        #3

        This looks really really nice cant way to implement it !
        Thank you very much SGaist ;)
        Cheers,

        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