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. Resizing QGraphicsItems
Forum Updated to NodeBB v4.3 + New Features

Resizing QGraphicsItems

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.4k 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.
  • D Offline
    D Offline
    Doru
    wrote on last edited by
    #1

    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
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved