Results 1 to 5 of 5

Thread: catch (spaceBar+mouse move) event

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2013
    Location
    Bangalore
    Posts
    27
    Thanks
    7
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Post catch (spaceBar+mouse move) event

    hi,
    i want to drag my scene, by dragging the mouse on scene & hold space bare (press and hold space bar + drag mouse) .
    what is the best place to check this combination and how can i check this condition .
    i have QGraphicsView and QGraphicsScene on QMainwindow .

    my idea is as below

    QGraphicsView:: mouseMoveEvent(QMouseEvent* f_event)
    {
    If(space bar is pressed and hold) // here how can I check key press event
    {
    Here we will set drag mode; //QGraphicsView:: ScrollHandDrag
    }
    }


    Thanks in advance :-)
    Last edited by prasad.ece2; 28th November 2013 at 15:44. Reason: updated contents

Similar Threads

  1. Replies: 3
    Last Post: 7th January 2012, 08:38
  2. catch global mouse press event
    By nick85 in forum Newbie
    Replies: 3
    Last Post: 15th June 2011, 13:37
  3. mouse move event filtering in PyQt4
    By lucaf in forum Qt Programming
    Replies: 1
    Last Post: 4th April 2009, 14:53
  4. Replies: 2
    Last Post: 4th August 2007, 04:31
  5. Mouse Move Event
    By merry in forum Newbie
    Replies: 5
    Last Post: 3rd June 2007, 06:26

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.