[Qt-jambi-interest] newbie needs orientation
Eskil Abrahamsen Blomfeldt
eblomfel at trolltech.com
Thu May 14 09:24:59 CEST 2009
jochen georges wrote:
> the signal-slot thing is new to me.
> i wonder why "setText()" is not a slot of lineedit.
>
Usually, when a method in a QObject is not a slot, it means the people
who designed the API didn't think there was a use case for it.
> how can i connect a pushbutton and a lineedit, that the lineedit says "hello"
> if the button is clicked?
>
Answered by someone else, so I'll leave it =)
> how can i create customsignals/ -slots?
>
For signals: As a member of your QSignalEmitter subclass, create an
object of one of the Signal-types:
private final Signal0 fooBar = new Signal0();
The number at the end of the class name indicates the number of
arguments to the signal. Parameterize the generic classes
Signal1-Signal9 with the argument types you need.
private final Signal2 fooBar<Integer, String> = new Signal2<Integer,
String>();
In Qt Jambi, all methods are slots unless you explicitly say they
shouldn't be with the QtBlockedSlot annotation.
> the books i found where c++/qt or python/qt
> is there a qtjambi book?
> or a book with just very little c++?
>
There is no book that I know of specifically for Qt Jambi. There is a
very good Qt-book by Jasmin Blanchette and Mark Summerfield which has an
appendix on Qt Jambi, but most of the book is focused on C++. A lot of
the API details of Qt programming will still be relevant for Qt Jambi,
of course, but you'll have to be able to discern which parts are the
same and which aren't.
There are documented examples and tutorials here that might help you:
http://doc.trolltech.com/qtjambi-4.5.0_01/com/trolltech/qt/qtjambi-index.html
-- Eskil
More information about the Qt-jambi-interest
mailing list