[commonqt-devel] Template class in CommonQt (e.g. QList)

Rujia Liu rujia.liu at gmail.com
Thu Sep 12 10:06:38 UTC 2013


Hi!

I'd like to create an item group for a QGraphicsScene with this function:

QGraphicsItemGroup * QGraphicsScene::createItemGroup ( const
QList<QGraphicsItem *> & items )

However, I don't know how to create a variable of type
QList<QGraphicsItem*>.
I even can't find the class:

* (qt:qapropos "QList")
; No debug variables for current frame: using EVAL instead of EVAL-IN-FRAME.
Class QListView
Class QListWidget
Class QListWidgetItem
Method QListView::QListView [7272]
Method QListView::QListView [7342]
Method QListView::~QListView [7356]
Method QListWidget::QListWidget [7364]
Method QListWidget::QListWidget [7422]
Method QListWidget::~QListWidget [7426]
Method QListWidgetItem::QListWidgetItem [7427]
Method QListWidgetItem::QListWidgetItem [7428]
Method QListWidgetItem::QListWidgetItem [7429]
Method QListWidgetItem::QListWidgetItem [7430]
Method QListWidgetItem::QListWidgetItem [7472]
Method QListWidgetItem::QListWidgetItem [7473]
Method QListWidgetItem::QListWidgetItem [7474]
Method QListWidgetItem::QListWidgetItem [7475]
Method QListWidgetItem::QListWidgetItem [7476]
Method QListWidgetItem::QListWidgetItem [7477]
Method QListWidgetItem::~QListWidgetItem [7480]

I tried to call canvas's items() and see what's inside. Then I see

(#<QGraphicsItem 0x01FEB0B8> #<QGraphicsItem 0x01FEABB8>)

That's the two items I created, before calling items(). So I see CommonQt
does some magic to convert QList to a lisp list.

Then I tried to pass nil (here I mean empty list, not false) to
createItemGroup, but I got the following: The value NIL is not of type
SYSTEM-AREA-POINTER. I think that's because nil is not like a "C pointer",
but I know almost nothing about CFFI or other low-level stuffs, so I'm
stuck now.

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


More information about the commonqt-devel mailing list