[Kde-perl] Right Click Menu
Steffen Liebergeld
SteffenL15 at gmx.de
Sun Aug 31 00:58:34 CEST 2003
Am Sam, 2003-08-30 um 22.45 schrieb Germain Garand:
> Le Samedi 30 Août 2003 19:51, Steffen Liebergeld a écrit :
> > Am Sam, 2003-08-30 um 19.17 schrieb Richard Dale:
>
> Hi Steffen,
>
> > should it look like this?
> >
>
> nearly :)
>
> > sub mousePressEvent{
>
> this is a Qt::ListView, which has a special way of handling mouse events (see
> $QTDIR/bin/assistant), the correct virtual is named
> "contentsMousePressEvents"
Cool! I didn´t even know Qtassistant. Thats very useful for me. Thanks
in advance!
> You can monitor which virtuals are called with
> use Qt::debug "virtuals";
> I recommend it, it's handy :)
>
> > shift->SUPER::NEW(@_);
>
> this call does not make sense here: it is only used in NEW to process the
> SUPER constructor (the NEW of the Qt::ListView) before processing
> the rest of your constructor.
Yea, that was like the most childish mistake of that little code
snippet;-)
> > if ($_[0]->button() == "RightButton"){
>
> it's right except that RightButton isn't a QString in Qt, but an enum value,
> which are accessed this way in PerlQt:
> &Qt::RightButton
> or even &RightButton in this context (every Qt class isa Qt::)
Now that I know this all looks so obvious to me!
> > rightmenu->exec(Qt::Cursor.po());
>
> and there it would be Qt::Cursor::pos()
Of course;-)
> Cheers,
>
> Germain
About the tutorial we are writing: i´m sorry we didn´t reach a state
which would be useful for a newbie. We have to write a lot more.
Although I think some parts of the tutorial are quite complete. But we
will publish it only when it is really usefull.
(and as you can see with my simple questions I still have to learn a
lot;-)
--
mit freundlichen Grüßen, with friendly greetings,
Steffen Liebergeld
More information about the Kde-perl
mailing list