Results 1 to 8 of 8

Thread: [MacOSX,eclipse CDT]want eclipse to know Qt classes

  1. #1
    Join Date
    Jul 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X

    Default [MacOSX,eclipse CDT]want eclipse to know Qt classes

    Hello,

    I have recently installed Qt4.3, then eclipse CDT.
    I would like to make Qt projects having classes recognizes by eclipse (with code completion), but now it's impossible: eclipse does not compile this example:

    Qt Code:
    1. #include <QApplication>
    2. #include <QFont>
    3. #include <QPushButton>
    4.  
    5. int main(int argc, char* argv[])
    6. {
    7. QApplication app(argc, argv);
    8.  
    9. QPushButton quit("Quit");
    10.  
    11. quit.resize(75, 30);
    12. quit.setFont(QFont("Times", 18, QFont::Bold));
    13.  
    14. QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));
    15.  
    16. quit.show();
    17.  
    18. return app.exec();
    19. }
    To copy to clipboard, switch view to plain text mode 

    I think that eclipse is bad-configured, and I'm in search of a tutorial which says what to append to the linker path, or to the compiler path (I found such a tutorial a few days ago but since I lost it and I can't retrieve it).

    I tried to follow another tutorial (Qt in 10 steps) but without any success: I created a project, copied the example above, copied a example.pro file from the tutorial, and created targets, but I have an error message saying the file example.pro is not reacheable...

    anyway, I prefer the first tutorial.


    thank you,

    lolveley.

  2. #2
    Join Date
    Jul 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: [MacOSX,eclipse CDT]want eclipse to know Qt classes

    Here is a screenshot of eclipse.

    lolveley.
    Attached Images Attached Images

  3. #3
    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: [MacOSX,eclipse CDT]want eclipse to know Qt classes

    See the Qt Eclipse Integration on Trolltech.com.
    Eclipse is pretty hard to be configured manually.

    Regards

  4. #4
    Join Date
    Jul 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: [MacOSX,eclipse CDT]want eclipse to know Qt classes

    no, that is not possible; I tried but the plugin is for windows and linux, not for MacOSX: it does not work on macs.

    lolveley.

  5. #5
    Join Date
    Jul 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: [MacOSX,eclipse CDT]want eclipse to know Qt classes

    could you show me the way to configure eclipse, marcel?

  6. #6
    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: [MacOSX,eclipse CDT]want eclipse to know Qt classes

    I would help, but I never configured it on Mac.
    Didn't know that the integration isn't available.

    But from the errors looks like Eclipse is missing the Qt include dirs.
    Try setting them and also make sure that $QTDIR is pointing to your installation and $QTDIR/bin is in the path.

    But, even if you manage to get rid of those errors, you will further have problems with moc and ui. Eclipse won't know to call them automatically for the right files.

    Here's a thread that might help you: http://lists.trolltech.com/qt-intere...ad00518-0.html.

    Regards

  7. #7
    Join Date
    Jul 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: [MacOSX,eclipse CDT]want eclipse to know Qt classes

    here is a photograph of the directory /developer/applications/qt: there is no /bin available.

    I don't know if this is important.
    Attached Images Attached Images

  8. #8
    Join Date
    Jul 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: [MacOSX,eclipse CDT]want eclipse to know Qt classes

    don't you think the configuration of eclipse on a mac is the same that the one on windows?

    I think we could try.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.