Results 1 to 13 of 13

Thread: QObject / QEvent compilation problem after reinstallation?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    160
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QObject / QEvent compilation problem after reinstallation?

    Hello Marcel and thank you for your help,

    My QMAKESPEC var is set to win32-msvc.net (I use the microsoft compiler provided with Microsoft Visual Studio.net 2003 to compile QT), i only use the Intel compiler to compile my projects (Which uses the QT includes / libs).

    The thing is, right before i reinstalled my PC, i was not having those errors, but i dont remember exactly what i have done to avoid them...

    Any other clue?

    Thanks again,
    Pierre.

    [EDIT:] I'll try to compile my projects with the MS compiler too just to see, but well... it was ok before i reinstall, and i really wish i get this config back to work =/

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QObject / QEvent compilation problem after reinstallation?

    Maybe you previously had some Service Pack/fix installed for VS, that you forgot about.

  3. #3
    Join Date
    Dec 2006
    Posts
    160
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QObject / QEvent compilation problem after reinstallation?

    I never had installed any update for VS, that's for sure. Anyway each time i restore my Ghost image, i run WUpdates untill there are none remaining... so any previously installed update would be there.

    No, i believe there is something i did wrong with my compilation steps (I dont remember what args i gave to ./configure the first time when it was OK)...

    I'll try to figure this out.

    Thanks anyway,
    Pierre.

  4. #4
    Join Date
    Dec 2006
    Posts
    160
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QObject / QEvent compilation problem after reinstallation?

    It's getting more and more weird...

    - I just have created a test project from scratch. A simple "Hello" widget.
    - I have used QMake to generate a project file usable with VS.
    - I was able to compile BOTH with intel and MS compilers =/

    So i have compared the options set in my project with the ones in the new test project. I have found no differences =/

    Any clue, please? I'm getting kinda lost there ^^
    Pierre.

    [EDIT:] After more testing, i removed every file related to QT from my project. It perfectly compiles, but if i just add "#include <QApplication>" anywhere in my project (But even dont instanciate any QApplication myself anywhere), i get this error:
    QtCore/../../src/corelib/kernel/qobject.h(108): error: expected an identifier
    The error points to this declaration line:
    virtual bool eventFilter(QObject *, QEvent *);
    What is this all about?
    Same error happends if i "#include <QObject>", but no error if i "#include <QString>".
    Last edited by hickscorp; 10th May 2007 at 21:00.

  5. #5
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QObject / QEvent compilation problem after reinstallation?

    Something is deeply wrong there...
    I suggest getting a fresh copy of Qt and try compiling it "by the book". I amnot sure how to do that, but you have to do it... Best of luck!

    Regards

  6. #6
    Join Date
    Dec 2006
    Posts
    160
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QObject / QEvent compilation problem after reinstallation?

    Yeah but well... would compiling "by the book" will deny me to compile my project with the MS compiler? =/

  7. #7
    Join Date
    Dec 2006
    Posts
    160
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QObject / QEvent compilation problem after reinstallation?

    Folks, i'm proud to publically anounce that all this topic was nothingness
    Just the solution if any Photoshop developpers decide to use QT in a plugin:
    - Go to your Photoshop SDK source tree,
    - Open the file PITerminology.h, and go to line #1009 which says:
    Qt Code:
    1. #define eventFilter 'Fltr'
    To copy to clipboard, switch view to plain text mode 
    This line defines a macro called "eventFilter", which obviously is misunderstood at compile time if you're using QT...

    There is an easy workaround if you dont use event filters in your code YET, just rename the macro like this:
    Qt Code:
    1. #define photoshopEventFilter 'Fltr'
    To copy to clipboard, switch view to plain text mode 
    Then in your code (Related to Photoshop eventFilters), dont use "eventFilter" but "photoshopEventFilter" as previously defined.
    Since we're very lucky, this macro isn't actually used in any other Photoshop's SDK file.

    It will solve the very anoying errors In fact i had corrected this error a long time ago, but since i reinstalled my PC (and Photoshop SDK), it was here again... and i didnt remember.

    After i find this kind of conflict errors, am i supposed to do some feedback to TrollTech or something?

    Thanks all for your help!

    Pierre.
    [EDIT:] You can get another similar error, if you get any error which points to QTabletEvent definition in QEvent.h, you have to use the same workaround for the keyState name in PITerminology.h, or just change the "keyState" variable name in the QEvent.h.
    Last edited by hickscorp; 10th May 2007 at 23:17.

Similar Threads

  1. qt4 compilation problem
    By aegis in forum Installation and Deployment
    Replies: 9
    Last Post: 22nd February 2007, 23:10
  2. qevent problem
    By amulya in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2006, 11:51
  3. Problem with Destructor of QObject
    By mikro in forum Qt Programming
    Replies: 5
    Last Post: 9th July 2006, 19:05
  4. Problem and solution about QSA 1.2.0 compilation
    By Dwarf007 in forum Installation and Deployment
    Replies: 5
    Last Post: 7th March 2006, 16:52
  5. subclassing/inheritance QObject problem
    By cbeall1 in forum Qt Programming
    Replies: 12
    Last Post: 13th February 2006, 17:49

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.