[Qt-interest] Qt vs Adobe Flash etc
Benjamin Meyer
ben at meyerhome.net
Tue Oct 13 05:12:26 CEST 2009
In the Qt git code checkout tests/auto/qlocalsocket/lackey/main.cpp
and then in the scripts folder it the scripts can create the c++
object QScriptLocalServer and QScriptLocalClient whenever they want.
This was back when it was hard, in 4.5 there was new api added to make
it easy, see the qtscript docs.
-Benjamin Meyer
On Oct 12, 2009, at 9:47 PM, Jason H wrote:
> I *tried* to do what you are talking about but was told it was not
> possible.
>
> So rather than be short, can we be constructive?
>
> I was told the only way to accomplish it would be to write the Item
> in C++ and provide the appropriate bindings, then recompile the
> bindings. Whomever I talked to was either wrong, or I completely
> misunderstood.
>
> So could you provide a simple example?
>
> Thanks.
>
>
>
> ----- Original Message ----
> From: Benjamin Meyer <ben at meyerhome.net>
> To: Jason H <scorp1us at yahoo.com>
> Cc: Andreas Unger <andi.unger05 at gmail.com>; qtInterest List <Qt-interest at trolltech.com
> >
> Sent: Mon, October 12, 2009 9:17:25 PM
> Subject: Re: [Qt-interest] Qt vs Adobe Flash etc
>
> On Oct 12, 2009, at 5:25 PM, Jason H wrote:
>
>> Yeah, but if you're going to have an Open Source replacement for
>> flash, having scripters modify C++ code is bogus.
>
> QtScript coders don't modify c++ code.
>
>> The PyQt library uses SIP to get around this, with the caveat that
>> you can't inherit from two C++ classes. The work-around for that is
>> to make an object that inherits one and proxies the other. A pain,
>> but you shouldn't have to recompile your C++ every time you want to
>> make a new object. And with PyQt you don't.
>
> You don't have to recompile your app every time a qscript guy wants
> a new qgraphicsview object.
>
>> I can't figure out why it is not supported by default
>
> It is.
>
>> - that if you inherit from QObject,
>
> QGraphicsViewItem doesn't
>
>> then QtScript should not care whether your object comes from C++ or
>> Qt script.
>
> It doesn't.
>
>> It's a major bummer. So much so that I'm willing to buy a PyQt
>> license. I tried. I gave up.
>
> Thats cool PyQt is a good project worth supporting.
>
> -Benjamin meyer
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
More information about the Qt-interest-old
mailing list