Qt Forum

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

    Call for Presentations - Qt World Summit

    Resizing QGraphicsItems

    General and Desktop
    2
    2
    3190
    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.
    • D
      Doru last edited by

      Hi,
      I have a problem when resizing customized QGraphicsItems.
      I am able to resize them by mouse dragging (drag from one of 8 resize handles, on ResizeHandle::mouseMove I actualy resize parentItem() ).
      The handle is a QGraphicsRectItem (4x4).
      The problem is that I want to establish a minimum width and a minimum height for all items ( eg minHeight,minWidth -> 20px).

      How can I restrict for instance the mouse vertical movement when I reach the minimum height ?

      1 Reply Last reply Reply Quote 0
      • Z
        ZapB last edited by

        Take a look at the docs for "QGraphicsItem::itemChange":http://doc.qt.nokia.com/latest/qgraphicsitem.html#itemChange. I think that can help you in this case.

        Nokia Certified Qt Specialist
        Interested in hearing about Qt related work

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