Results 1 to 6 of 6

Thread: event problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: event problem

    Quote Originally Posted by windkracht8
    Anyone any idea how this is possible?
    You don't invoke the base class implementation.

    Try:
    Qt Code:
    1. bool frmMain::event(QEvent* event)
    2. {
    3. if(event->type() == QEvent::User){
    4. bC* eTemp = (bC*)event;
    5. iTemp = eTemp->rij();
    6. iTemp2 = eTemp->col();
    7. knopGeklikt(iTemp,iTemp2);
    8. event->accept();
    9. return true;
    10. }
    11. return QWidget::event( event );
    12. }
    To copy to clipboard, switch view to plain text mode 
    or better:
    Qt Code:
    1. bool frmMain::customEvent(QEvent* event)
    2. {
    3. if(event->type() == QEvent::User){
    4. bC* eTemp = (bC*)event;
    5. iTemp = eTemp->rij();
    6. iTemp2 = eTemp->col();
    7. knopGeklikt(iTemp,iTemp2);
    8. event->accept();
    9. return true;
    10. }
    11. return QWidget::customEvent( event );
    12. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to jacek for this useful post:

    windkracht8 (17th August 2006)

Similar Threads

  1. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  2. Problem with receiving events from QDateEdit
    By gunhelstr in forum Qt Programming
    Replies: 4
    Last Post: 20th April 2006, 11:21
  3. Workload in a QThread blocks main application's event loop ?
    By 0xBulbizarre in forum Qt Programming
    Replies: 14
    Last Post: 9th April 2006, 21:55
  4. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.