Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: albert on August 22, 2006, 02:03:28 pm

Title: Code completion in QT
Post by: albert on August 22, 2006, 02:03:28 pm
Hi,

When I type QApplication:: and then I use code completition (ctrl+space) I see only names of functions of this class - is it possible to have all functions (properties, events etc) inherihted from others classes?

When I type QPushButton quit("quit"); and then quit. (ctrl+space) then I dont have window with completion code - why is that ? When I type QPushButton:: ive got few of thems ..

Thank You.
Title: Re: Code completion in QT
Post by: eranif on August 22, 2006, 04:39:58 pm
Hi,

I can only take a wild guess that the declaration of a member like this:

QButton quit("quit"); --> was parsed incorrectly to a function by the parser - it can be treated by mistake to be a function name 'quit' that return QButton ...

My guess, that if you will try
QButton quit;
and then assign the value "quit" to it using QButton functions it will work.

or even
QButton *quit = new QButton("quit");
 will also work.

Eran
Title: Re: Code completion in QT
Post by: mandrav on August 22, 2006, 04:59:49 pm
Eran, you 're correctly guessing that it's not parsed but not because it is taken for a function.
It's just that for local scope, the parser ignores this case.
Title: Re: Code completion in QT
Post by: albert on August 22, 2006, 10:34:15 pm
Hello,

QButton quit; and then assign the value "quit" to it using QButton functions it will work.
It doesnt for me - I am using build 24 oct 2005 on Windows (1.0RC2).

Eran, you 're correctly guessing that it's not parsed but not because it is taken for a function.
It's just that for local scope, the parser ignores this case.

Ive setup settings->pluggins settings->code completion->Follow GLOBAL includes - but it didnt helped.
What I am doing wrong?

I have also problems when I type QObject:: the list doesnt seems to have all entries. I dont have for example connect() function.

Thank You.
Title: Re: Code completion in QT
Post by: Der Meister on August 22, 2006, 10:37:24 pm
You should upgrade to a current nightly build. There were a lot of improvements and bugfixes since the release of RC2.
Title: Re: Code completion in QT
Post by: albert on August 23, 2006, 01:18:58 am
You should upgrade to a current nightly build. There were a lot of improvements and bugfixes since the release of RC2.

Nighlty builds are only for Windows. That's not good becouse Ive searched cross-platform IDE I think I will have to get back to vim.

Thank You for help.
Title: Re: Code completion in QT
Post by: sethjackson on August 23, 2006, 01:46:50 am
You should upgrade to a current nightly build. There were a lot of improvements and bugfixes since the release of RC2.

Nighlty builds are only for Windows. That's not good becouse Ive searched cross-platform IDE I think I will have to get back to vim.

Thank You for help.

What! :shock: Code::Blocks is cross-platform. :)
Anyways you could build it from source.... Besides that sometimes a build is provided for Linux.
I don't think that Vim has code-completion either?
Title: Re: Code completion in QT
Post by: moloh on August 23, 2006, 03:47:10 am
I don't think that Vim has code-completion either?

It has, few different types...
Specificly for c/c++ and few other languages there is a plugin IComplete, but in the base vim distribution there are few things that can be used.
Title: Re: Code completion in QT
Post by: sethjackson on August 23, 2006, 03:48:19 am
I don't think that Vim has code-completion either?

It has, few different types...
Specificly for c/c++ and few other languages there is a plugin IComplete, but in the base vim distribution there are few things that can be used.

Hmm ok didn't know that. Thanks for the info. :)
Title: Re: Code completion in QT
Post by: Game_Ender on August 23, 2006, 03:59:58 am
The old Unix stand by editors, Vi and Emacs, can do quite a bit more than the Scintilla in Code::Blocks can they are just harder to use and setup.