QtCreator autocompletion not working as expected



  • The autocompletion feature of my QtCreator doesn't work correctly, for example if I type "this." the dot is not automatically replaced with the arrow as "this->". Or if I digit the dot operator after a widget for example QWidget w; ... then I write "w." and no list of possible suggestions show up, only if I hit "CTRL+space".

    I tried to reset all settings (with "rm -r .config/Nokia") but still have this bug.

    Only creating a new user on my ubuntu system solves this problem, so it seems there is some conflict in the settings file, but as I said, I removed all settings....

    Any suggestions?


  • Moderators

    Which version do you use?

    Is the documentation available?



  • Im using ubuntu 12.04 with Qt 4.8.1 and QtCreator 2.4.1.

    But the strange thing is that the same set of packages work well on a newly created user on the same system...

    Thank you!


  • Moderators

    Your description makes me think that creator is not able to pick up the headers you use. The settings have little influence on that. Does your project build? If it does not, then your .pro-file is most likely not including gui support (QT -= gui or something in it). Other things that influence the look up of headers are: The Qt version and the tool chain selected. Are those settings sane/identical those used by the other user?

    PS: Try running creator with "-settingspath /tmp/creator" to force it to write its settings into /tmp the next time. That way you do not have to nuke your settings;)



  • OK, I just tried the command to force a new settings dir, but without luck.

    It does not depend on my project because it happens also on every newly created project just for testing...

    BTW the project compiles and runs fine, only the autocompletion is broken.

    I don't get it:
    On my machine it works if I create a new user with its home and its settings... so we can exclude most of lib/dep/global-conf issues, it is due some hidden configuration (maybe from KDE?? Kate?).

    Thank you for your time


  • Moderators

    Creator does not read any settings from kate/kde/whatever that I am aware of. Maybe some style things or something, but nothing that should influence the code model.

    So did you check to make sure the Qt versions and tool chains are identical between your current and the new user?



  • How do you check that? (I checked the build output)

    I'm using Qt 4.8.1 on my user and on the new test account, so it seems they are identical.


  • Moderators

    Tools->Options->Build & Run->Qt Version and Tools->Options->Build & Run->Tool Chain



  • Yes they are the same: 4.8.1 from sytsem path



  • Ok so I found the problem...

    It seems that the new ubuntu/gnome dconf thing is messing up with qt...

    1. When deleting the .config directory entirely, it works (this is the reason it works afor new users on the same system).

    2. When deleting only the Nokia folder in .config: problem still persistent...

    Now I found out that it is necessary to delete the dconf folder in .config in order to reset completely all settings, and now it works. After all I just losed all settings since dconf uses a binary blob for all settings (gnome devs are really the best :( )

    So to sum up, you need to rm dconf in .config, since I didn't find which entry in dfconf-editor is resposable for this mess...


  • Moderators

    Autsch, losing all settings hurts! But I am glad you found this out, I am sure you won't be the last person to stumble over this!

    It would be interesting to know which settings end up in the dconf database. My guess is that all settings written by a Qt Creator built and shipped by ubuntu do while the settings written by a Qt Creator downloaded via the Qt SDK does not. We ship our own Qt along and that comes without any special ubuntu patches.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.