we have a class
Qt Code:
  1. class custom::public QObject
  2. {
  3. Q_OBJECT
  4. public:
  5. custom(QWidget *parent)
  6. {
  7.  
  8. }
  9. bool event (QEvent *e)
  10. {
  11. //get cursor position.
  12.  
  13. }
  14. };
To copy to clipboard, switch view to plain text mode 


suppose we have the above child class. Inside child class event how can we get cursor position irrespective of whether the cursor is on the parent or on the other child of same parent. I have inherited from QObject because i dont want to create any widget in this class just i want to know cursor position to handle other objects.