Results 1 to 2 of 2

Thread: Bounding QWidget within QGraphicsView

  1. #1
    Join Date
    Sep 2010
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Bounding QWidget within QGraphicsView

    Hello I have a QGraphicsProxyWidget displayed on a QGraphicsView viewport (im rendering OpenGL within the viewport aswell)

    ive been trying to make sure that the QGraphicsProxyWidget never goes out of bounds within my viewport (or mainwindow)

    how do i make sure that if the user drags my proxywidget that it doesnt go out of bounds (ie make sure that you can always see the proxywidget no matter where the user drags it)

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Bounding QWidget within QGraphicsView

    Reimplement QGraphicsItem::itemChange() and handle the QGraphicsItem::ItemPositionChange case.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to Disable Scroll Bar of QGraphicsView (or QWidget) ??
    By jiapei100 in forum Qt Programming
    Replies: 5
    Last Post: 6th November 2011, 04:45
  2. Replies: 3
    Last Post: 30th March 2010, 16:04
  3. Getting the bounding rectangle
    By ioannis in forum Qt Programming
    Replies: 1
    Last Post: 22nd May 2009, 01:41
  4. QGraphicsView and adding QWidget with transparent areas
    By sting73 in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2009, 12:19
  5. hide bounding rect
    By dreamer in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2008, 10:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.