[commonqt-devel] Re: Question abot CommonQt examples

Rujia Liu rujia.liu at gmail.com
Thu Sep 12 02:42:35 UTC 2013


On Thu, Sep 12, 2013 at 3:31 AM, Stas Boukarev <stassats at gmail.com> wrote:

> Indeed. But it looks like this sequence of code is repeated in all the
> projects. So, I decided to make it easier.
>
> That's good! :)


>
> Good to hear that. Feel free to ask any questions, the documentation may
> be lacking in some aspects.
>
I updated it to mention the above changes. And also added a description
> on how to better connect signals and some additional information about
> method overrides.

Great. I've just experimented about ways to connect signals yesterday :)
I also used with-objects macro, after comparing with C++ version and also
looking at the macro's source code. I think the spirit is: if the C++
version used a local object (implicit object construction and destroying),
use with-objects; but if the C++ version used a pointer without deleting
it, don't use with-objects. Correct me if I'm wrong, and I think this
information is quite useful for new CommonQt users if you add it to the
documentation.

Another interesting thing is QVector's streaming operator:

QPolygon polygon;
polygon << QPoint(10, 20) << QPoint(20, 30);

Of course it's not mandatory to use "<<" but it's convenient. Just curious:
can we do it similarly in CommonQt?

BTW: I'm talking about this because I use QPolygon in my project. It uses
QGraphicsView heavily and everything is going on very well.

- Rujia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/commonqt-devel/attachments/20130912/50351948/attachment.html>


More information about the commonqt-devel mailing list