Results 1 to 6 of 6

Thread: Can anyone explain the behaviour of the QtCreator

  1. #1
    Join Date
    Jun 2008
    Posts
    83
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Can anyone explain the behaviour of the QtCreator

    Hi:

    I've got a question concerning QtCreator that has been bugging me for a while now.

    I've got this relatively large program that I'm devolping and all of these classes.

    Now in some of these classes using the F1 to use the help and the auto complete feature just absolutely refuses to work.

    Can any one tell me why the Creator might do this? Is there something I can do to correct it?

    Thanks

    PD: The program compiles. At first I thought It was something like Eclipse where certain syntax errors make the auto complete unavailable, but that's not the case.

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

    Default Re: Can anyone explain the behaviour of the QtCreator

    Qt Creator performs auto-completion based on indexing header files which is done right after loading the project. Either your classes (cpp or h files) are not added to the project or there or there is something wrong with the include statements.

  3. #3
    Join Date
    Jun 2008
    Posts
    83
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Can anyone explain the behaviour of the QtCreator

    If there were something wrong with the include statements then it would not compile. I can see nothing wrong with them.

    Same thing goes if the classes are not included (they would not have been added to .pro file). They are part of the project.

    And the program compiles just fine. And sometimes after a while it just starts autocompleting correctly.

    But thanks for the answer.
    Last edited by aarelovich; 17th February 2009 at 19:02.

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

    Default Re: Can anyone explain the behaviour of the QtCreator

    Quote Originally Posted by aarelovich View Post
    If there were something wrong with the include statements then it would not compile.
    It's not that simple. Compilation is a much more complex process than the one performed by QtCreator. Make sure you directly include files containing declarations of classes you want to use in each file you want to use them in.

    And sometimes after a while it just starts autocompleting correctly.
    Well... that you fogot to mention in the previous post Indexing is done in background, so if you have a complex hierarchy of classes it might take a while for Creator to catch up. Take a look at the status bar to see if the indexing process is running.

  5. #5
    Join Date
    Jun 2008
    Posts
    83
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Can anyone explain the behaviour of the QtCreator

    Hi:

    I've haven't included classes directly. If I have a class A that includes a class B that includes a class C then I don't include class C in A. Maybe that's the problem?

    And no the indexing bar is not running.

    Thanks

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

    Default Re: Can anyone explain the behaviour of the QtCreator

    Do the classes for which the completion doesn't work follow some kind of pattern? Do they have a similar design or maybe they are derived from the same base class or something like that?

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.