News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Code completion in QT

Started by albert, August 22, 2006, 02:03:28 PM

Previous topic - Next topic

albert

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.

eranif

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

mandrav

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.
Be patient!
This bug will be fixed soon...

albert

Hello,

Quote from: eranif on August 22, 2006, 04:39:58 PM
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).

Quote from: 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.

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.

Der Meister

You should upgrade to a current nightly build. There were a lot of improvements and bugfixes since the release of RC2.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

albert

Quote from: 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.

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.

sethjackson

#6
Quote from: albert on August 23, 2006, 01:18:58 AM
Quote from: 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.

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?

moloh

Quote from: sethjackson on August 23, 2006, 01:46:50 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.

sethjackson

Quote from: moloh on August 23, 2006, 03:47:10 AM
Quote from: sethjackson on August 23, 2006, 01:46:50 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. :)

Game_Ender

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.