[Qt-creator] C++11 (e.g. std::thread) and code-completion in qtcreator

Leandro T. C. Melo leandro.melo at nokia.com
Tue Dec 13 10:13:27 CET 2011


On 12/12/2011 8:23 PM, ext Wilhelm wrote:
> Am 12.12.2011 15:51, schrieb Leandro T. C. Melo:
>> On 12/12/2011 5:40 AM, ext Wilhelm wrote:
>>> Hi all,
>>>
>>> the minimal example below compiles/executes fine, but I'm missing the
>>> code-completion features of qtcreator: e.g. writing
>>>
>>> t.j<Ctrl-Space>
>>>
>>> doesn't show any code-completions.
>>>
>>> What am I missing here?
>>>
>>> ---
>>>
>>> #include<iostream>
>>> #include<thread>
>>>
>>> void hello()
>>> {
>>>         std::cout<<   "Hello"<<   std::endl;
>>> }
>>>
>>> int main() {
>>>         std::thread t(hello);
>>>
>>>         t.join();
>>>
>>>         return 0;
>>> }
>>>
>>
>> Hi,
>>
>> I get completion normally for t in your code. Could you please verify
>> whether your #include<thread>  is actually found (or is it highlighted)?
>
> Yes, it is found (it is *not* underlined) and I can switch to it using 
> F2.
>

All right... It worked for me but I tested with Visual C++ 2011 Dev Ed. 
(we managed to parse the header correctly), but I guess you are probably 
using another toolchain then. As Roberto mentioned we don't have much 
C++11 support currently, so this is unfortunate...

-- 
Leandro T. C. Melo
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori




More information about the Qt-creator mailing list