Author Topic: Code completion in QT  (Read 7405 times)

albert

  • Guest
Code completion in QT
« 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.

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: Code completion in QT
« Reply #1 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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Code completion in QT
« Reply #2 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.
Be patient!
This bug will be fixed soon...

albert

  • Guest
Re: Code completion in QT
« Reply #3 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.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Code completion in QT
« Reply #4 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.
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

  • Guest
Re: Code completion in QT
« Reply #5 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.

sethjackson

  • Guest
Re: Code completion in QT
« Reply #6 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?
« Last Edit: August 23, 2006, 01:48:41 am by sethjackson »

moloh

  • Guest
Re: Code completion in QT
« Reply #7 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.

sethjackson

  • Guest
Re: Code completion in QT
« Reply #8 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. :)

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Code completion in QT
« Reply #9 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.