Results 1 to 5 of 5

Thread: Overloading QGraphicsView function from Qt Designer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2011
    Posts
    5
    Qt products
    PyQt3 PyQt4
    Platforms
    Windows
    Thanks
    1

    Default Overloading QGraphicsView function from Qt Designer

    Hello!

    I'm having a bit of trouble with overloading a function for a QGraphicsView of mine. The QGraphicsView was created in Qt Designer and is called nodeDropWindow. In this example I'm trying to overload the wheelEvent but I just want to get anything working. This is in my mainForm() class where setupUI is called. From my understanding all I would have to implement is:

    Qt Code:
    1. @pyqtSignature("QEvent")
    2. def on_nodeDropWindow_wheelEvent(self, event):
    3. print("Hi!")
    To copy to clipboard, switch view to plain text mode 

    So what I"m trying to do is just get my console to print "Hi!" whenever I use my mouse wheel over the graphics window. This seems so simple to me but I can't get it working :-( Anybody have any ideas? Thanks!
    Last edited by drumboy354; 15th November 2011 at 19:16.

Similar Threads

  1. overloading paintEvent() function
    By Aayush in forum Qt Programming
    Replies: 5
    Last Post: 20th July 2011, 19:59
  2. How to use QGraphicsView in designer
    By dpatel in forum Qt Programming
    Replies: 3
    Last Post: 6th June 2011, 11:51
  3. Replies: 3
    Last Post: 27th August 2010, 06:00
  4. Replies: 1
    Last Post: 30th July 2010, 07:50
  5. QGraphicsView scale function
    By forrestfsu in forum Qt Programming
    Replies: 2
    Last Post: 12th October 2006, 14:05

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.