|
|
|
Re: QT and CDT [message #125965 is a reply to message #125860] |
Thu, 04 November 2004 19:25 |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
Vaidotas Radžius wrote:
> Gael Martin wrote:
>> Dear all, I'm using CDT 2.1RC0 to develop QT applications.
>> QT use this signals/slots mechanism, therefore you do find the macro
>> "slots" and "signals" in the classes declaration, for instance:
>>
>> class Test : public QObject
>> {
>> public:
>> Test();
>> ~Test();
>> private slots:
>> void mySlot();
>> signals:
>> void mySignal();
>> }
>>
>> However the CDT parser failed to register the class whenever it finds
>> the word "signals" or "slots" in the class declaration. Is there anyway
>> to configure the parser to ignore them and still register this as a
>> class or I have to dig into the code?
>>
>> Gael
>>
> In Project Peoperties -> C/C++ Include Paths & Symbols press Add
> Preprocessor Symbol button and type in signals=/*signals*/. Repeat the
> same with slots
> Maybe this helps
But are not those things define somewhere in a qt header, for all to use.
maybe the problem is that this file was not included i.e. #include
qt_macros.h
are something ?
Not a QT expert
> Vaidas
|
|
|
Re: QT and CDT [message #134667 is a reply to message #125965] |
Wed, 12 January 2005 21:55 |
Eclipse User |
|
|
|
Originally posted by: pardsbane.offthehill.org
alain wrote:
> Vaidotas Radžius wrote:
>
>> Gael Martin wrote:
>>
>>> Dear all, I'm using CDT 2.1RC0 to develop QT applications.
>>> QT use this signals/slots mechanism, therefore you do find the macro
>>> "slots" and "signals" in the classes declaration, for instance:
>>>
>>> class Test : public QObject
>>> {
>>> public:
>>> Test();
>>> ~Test();
>>> private slots:
>>> void mySlot();
>>> signals:
>>> void mySignal();
>>> }
>>>
>>> However the CDT parser failed to register the class whenever it finds
>>> the word "signals" or "slots" in the class declaration. Is there
>>> anyway to configure the parser to ignore them and still register this
>>> as a class or I have to dig into the code?
>>>
>>> Gael
>>>
>> In Project Peoperties -> C/C++ Include Paths & Symbols press Add
>> Preprocessor Symbol button and type in signals=/*signals*/. Repeat the
>> same with slots
>
>
>> Maybe this helps
>
>
> But are not those things define somewhere in a qt header, for all to use.
> maybe the problem is that this file was not included i.e. #include
> qt_macros.h
> are something ?
Yes, however, they are defined as:
#define signal
#define slot
so perhaps they cannot be properly interpreted?
|
|
|
|
|
Re: QT and CDT [message #641568 is a reply to message #641509] |
Fri, 26 November 2010 07:03 |
Axel Mueller Messages: 1973 Registered: July 2009 |
Senior Member |
|
|
Daniel wrote on Thu, 25 November 2010 19:05 | Hello guys,
Propably it is not anymore usefull for you, but what i do to get it work is the following:
first i add the path that vaias said before:
"In Project Peoperties -> C/C++ Include Paths & Symbols press Add
Preprocessor Symbol button and type in signals=/*signals*/. Repeat the
same with slots "
And then i add
#define signals
#define slots
as well as the declaration of the slot: (for example)
private slots:
void on_Ok_clicked();
on the ui_AddressBook.h
finally the code for the on_Ok_clicked() on the AddresBook.cpp.
I hope it is gonna help someone....
|
It is not necessary to add the defines manually. You should add the include path for Qt in Project Peoperties -> C/C++ General->Include Paths & Symbols->Includes (C++). Eclipse will then find the correct headers and can resolve the symbols.
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
|
|
|
Powered by
FUDForum. Page generated in 0.02923 seconds