Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator autocompletion not working as expected

QtCreator autocompletion not working as expected

Scheduled Pinned Locked Moved Qt Creator and other tools
11 Posts 2 Posters 12.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    giowck
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Which version do you use?

      Is the documentation available?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giowck
        wrote on last edited by
        #3

        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!

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          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;)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giowck
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              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?

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giowck
                wrote on last edited by
                #7

                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.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #8

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

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giowck
                    wrote on last edited by
                    #9

                    Yes they are the same: 4.8.1 from sytsem path

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      giowck
                      wrote on last edited by
                      #10

                      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...

                      1 Reply Last reply
                      1
                      • T Offline
                        T Offline
                        tobias.hunger
                        wrote on last edited by
                        #11

                        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.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved