[Qt-jambi-interest] Error onconnecting QCheckBox.toggledwith QDialog.setVisible(boolean)

Curt Nowak cnowak at bwl.uni-hildesheim.de
Fri Jul 4 13:29:02 CEST 2008


Hi Waldemar,

this is a little off-topic but the signal/slot mechanism in the C++ version of Qt is created using a meta object compiler (MOC) that runs before the actual C++ compiler. It's quite tricky as far as I am concerned. I don't know any details on the MOC but it might be that declaring a function/procedure to be a slot would have bloated the dll's or is a memory/performance issue. Then again, maybe it's because they wanted to keep the API as simple as possible (one of Qt's biggest strengths).
I'm sure Trolltech had good reasons not to declare every function/procedure to be slots. But to be honest: I just don't know the reason :-)

Curt


-----Ursprüngliche Nachricht-----
Von: qt-jambi-interest-bounces at trolltech.com [mailto:qt-jambi-interest-bounces at trolltech.com] Im Auftrag von Waldemar Wittmann
Gesendet: Freitag, 4. Juli 2008 12:07
An: qt-jambi-interest at trolltech.com
Betreff: Re: [Qt-jambi-interest] Error onconnecting QCheckBox.toggledwith QDialog.setVisible(boolean)


Am Freitag, den 04.07.2008, 11:51 +0200 schrieb Curt Nowak:
> Hi Waldemar,
> 
> this must be a case of what Eskil explained:
> <quote>
> > If the Generator sees a
> > function in a QObject subclass (such as QDialog) which is not set as 
> > a
> > slot in C++, and thus not intended to be a slot in the API, then it will 
> > mark it with a @QtBlockedSlot annotation in Java. This means the method 
> > will not be connectable and will not turn up in lists over available 
> > slots in Designer etc. 
> </qoute>
> If you take a look at http://doc.trolltech.com/4.4/qtreeview.html 
> you'll see setAnimated(bool) only as a function, but not as a slot.
> 
> Curt
> 

thx for your answer,
i thought i report it. I don't understand C++ and Qt, so why is the function and all the other functions in Qt not declared as a slot?

Waldemar

_______________________________________________
Qt-jambi-interest mailing list
Qt-jambi-interest at trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest




More information about the Qt-jambi-interest mailing list