Results 1 to 11 of 11

Thread: QGraphicsScene drag event

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: QGraphicsScene drag event

    What functionality are u trying to achieve with your application ?
    I am still not able to understand why you need drag drop handling.

  2. #2
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    136
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 3 Times in 3 Posts

    Default Re: QGraphicsScene drag event

    What functionality are u trying to achieve with your application ?
    you already asked that question and I answered!

    I don't need drag/drop handling but I need to tell when the mouse is moving and the button is down, and for some reason the mousemove event isn't being called when the button is down.
    Anyway, I've got the mouse events I want now with the drag events.
    Thanks for trying to help.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: QGraphicsScene drag event

    you already asked that question and I answered!

    I don't need drag/drop handling but I need to tell when the mouse is moving and the button is down, and for some reason the mousemove event isn't being called when the button is down.
    Anyway, I've got the mouse events I want now with the drag events.
    Thanks for trying to help.
    Reply With Quote
    That is fine. But I wanted to know are u trying to move graphics Item ? or are u trying to change color / monitor cursor position of hover over graphics item ?

    You had mentioned you are trying paint like program. And I also mentioned graphics view isnt that necessary for that.
    And without code of what you have tried, it is very difficult to say where you are going wrong.

  4. #4
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    136
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 3 Times in 3 Posts

    Default Re: QGraphicsScene drag event

    That is fine. But I wanted to know are u trying to move graphics Item ? or are u trying to change color / monitor cursor position of hover over graphics item ?
    I was after zoom with scrollbars and separate layers for the background image and foreground annotations. So that's what I have now with the scene/view stack.
    Later I may have to add the ability to adjust control points of an annotation, but hopefully not.

    I've implemented a similar widget in FLTK and it was a pain. Qt is fortunate to have higher level widgets like the graphic scene/view.

    Richard

  5. #5
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Default Re: QGraphicsScene drag event

    Hi to all!

    I have some widgets embedded into QGraphicsView via QGraphicsProxies. Now, how do I prevent those widgets from being dragged arround view. They must not be moved. Method setDragMode does not work. Please help!
    Qt 5.3 Opensource & Creator 3.1.2

Similar Threads

  1. Custom event gets not propagated to the top level widget
    By nightghost in forum Qt Programming
    Replies: 0
    Last Post: 29th January 2009, 10:06
  2. Drag & Drop when parent and childs accept drops?
    By gri in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2008, 10:00
  3. QGraphicsScene doesn't enter drag event
    By Radagast in forum Qt Programming
    Replies: 8
    Last Post: 16th June 2008, 18:21
  4. Qt event queue overloading?
    By gct in forum Qt Programming
    Replies: 3
    Last Post: 17th March 2008, 19:39
  5. Drag and drop revisited
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 30th June 2006, 17:41

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
  •  
Qt is a trademark of The Qt Company.