Qt Creator problem



  • At the past, when i type "ui.", the creator will automatically change it to "ui->". But it is not working now, it will remain as "ui.".

    Am I changed some setting make that this function is disabled?

    P.S: I've tried close the Qt Creator and open it again but it still remains.


  • Moderators

    It all depends on what your project structure looks like. The code that QtC automatically generates for widgets usually declares the "ui" object, too. But if, for example, you declare your widgets to inherit from the UI header, all widgets will be accessible without the "ui" part - just by their names.



  • sierdzio:
    I dun really understand what u talking. I just suddenly found that my Qt Creator's auto completion function is not functioning well. The "ui" is a pointer of a object where it is generated automatically. Few days ago, it will automatically change the "." to "->" since the "ui" is a pointer of object. But now, it remains as ".".

    I had also found that after i type 3 character after it, it will change to "->".
    For example:

    ui.xxx will become ui->xxx

    Why the auto completion not running immediately? Any setting on it?


  • Moderators

    Ah, ok. I thought you might have changed your project.

    You might try going to Tools->C++->Update code model, but I doubt it would help. I don't think that kind of thing has ever happened to me. Also, try rebuilding your project - maybe if ui_*.h file is missing, QtC cannot extract object info?



  • The problem now is the auto completion not function immediately...
    It will only function after 3 characters are key in.


  • Moderators

    Standard setting in Qt Creator is for auto completion to be triggered after 4 characters. You can force it to be run earlier by using Ctrl+Space.



  • But i rmb tat last time the "." symbol will change to "->" immediately.

    Btw, the changing of "." to "->" is it the function of auto completion?


  • Moderators

    Doh, I don't know :) I'm just throwing some random ideas hoping that any would be helpful to you :P I know it used to change immediately for you and as I've already said, I don't know why that behaviour changed for you, nor do I know how to fix it.



  • Then I have to wait for other professionals T_T
    Anyway thx for ur reply :)


  • Moderators

    I recently had a similar issue in Qt Creator from master branch. It is fixed by now. So if you are using a build from master you might want to try updating.



  • What does it means by "build from master"?


  • Moderators

    "master" is the branch where all our development happens. So anything build from that branch has all the latest and greatest features and of course bugs;-)

    Currently the version number used in the master branch is 2.5.81.


Log in to reply
 

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