Qt Forum

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

    Extend rectangle size by click

    General and Desktop
    2
    2
    806
    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.
    • BlackMamba
      BlackMamba last edited by

      Hello everybody,

      I have a class which inehits of QGraphicsWidget which enables to build rectangles. I would like to be able to extend the rectangle when I click near the border to change the lenght. I mean : left click on the right border for example, stay on click, move the mouse to where you want to extend, then release. (kind of drag and drop)
      What is the best way to do that in your opinion?

      1 Reply Last reply Reply Quote 0
      • C
        Code_ReaQtor last edited by

        Take a look into my "fork":https://github.com/Code-ReaQtor/sizegripitem in github, however it works ONLY with QGraphicsRectItem and QGraphicsEllipseItem. You may use it as a reference.

        Please visit my open-source projects at https://github.com/Code-ReaQtor.

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