Results 1 to 8 of 8

Thread: Trivial re-implementation of QCoreApplication::notify entails infinite loop

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Trivial re-implementation of QCoreApplication::notify entails infinite loop

    Quote Originally Posted by guenthk View Post
    Of what avail is it to install an event filter for the application object?
    You would intercept every event that happens in your application before it reaches its destination.

  2. #2
    Join Date
    Sep 2006
    Location
    Seeheim/Germany
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trivial re-implementation of QCoreApplication::notify entails infinite loop

    Now I have tested the event filter method for the application object, the QSplitter and the QSplitter children. Result: Not a single event has been caught by the event filter, except for two child events from an object for that I had not installed an event filter.

    Now I'll test whether the same happens on Linux.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Trivial re-implementation of QCoreApplication::notify entails infinite loop

    Can we see the code?

  4. #4
    Join Date
    Sep 2006
    Location
    Seeheim/Germany
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trivial re-implementation of QCoreApplication::notify entails infinite loop

    You mean the event filter installation?:

    Qt Code:
    1. MyMainFrame::MyMainFrame() : QMainWindow() {
    2. ...
    3. myApp->installEventFilter(this);
    4. ...
    5. }
    6.  
    7. bool MyMainFrame::eventFilter(QObject *o, QEvent *e) {
    8. return false;
    9. }
    To copy to clipboard, switch view to plain text mode 

    The eventFilter function is never called except in those two cases where I hadn't installed an event filter for o. Rather strange! The same happens in SuSE-Linux 10.3/Qt4.3.3.

    I am now about to install Qt4.3.4 on Vista, hoping that the problem will disappear in some wondrous way then.
    Last edited by jpn; 6th March 2008 at 17:55. Reason: missing [code] tags

  5. #5
    Join Date
    Sep 2006
    Location
    Seeheim/Germany
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trivial re-implementation of QCoreApplication::notify entails infinite loop

    After I have installed Qt4.3.4 and rebuilt our whole application, the reimplementation of QCoreApplication::notify now works without problems on Vista.

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.