[Qt-creator] Auto-complete ui elements

Israel Brewster israel at frontierflying.com
Thu Feb 5 19:10:01 CET 2009


On Feb 5, 2009, at 8:29 AM, Daniel Teske wrote:

> On Thursday 05 February 2009 18:16:49 ext Israel Brewster wrote:
>> I don't know if this is a bug with me or QtCreator, but for some
>> reason I can't get it to auto-complete form elements. Neither control
>> tabbing to fill out the rest of the name, or hitting . or -> after
>> typing the name works. However, the program does compile and run
>> correctly if I type in the functions manually. What am I missing  
>> here?
>> Running QtCreator RC1 on Mac OS X 10.5.6. Thanks.
>
> That should work, but only after a "Build Project". Since qt creates a
> ui_NAME.h file for each .ui file at build time. (And we parse those  
> files
> after the build.)
> But I guess, for you it doesn't work even after a build, right?
>
> Since that is a relatively complex and rather new code, it could be  
> that you
> have found a bug. Could you look at the #include "ui_NAME.h" line  
> and see
> wheter there is a yellow underline? If so, then that means we didn't  
> figure
> out the path to the "ui_NAME.h" file.

Ok, I've managed to reproduce it in a new project- apparently it only  
occurs when I'm using a shadow build directory. If I let the build run  
in the main directory, it works with the aforementioned caveat of  
having to restart QtCreator before it picks up the changes. However,  
if I set a "Shadow build", nothing I do seems to pick up the new  
ui_NAME.h files, and yes, there is a yellow underline on that include  
line. Interestingly, if I copy the ui_* files out of the build  
directory into the main directory and restart QtCreator, or if I  
prefix the ui_*.h in the include line with <shadow_build_directory>/,  
it works. So it looks like the parser is looking for the ui_* files in  
the same directory as the rest of the source files, even with "shadow  
build" selected.

-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------

>
>
> daniel
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator




More information about the Qt-creator-old mailing list