<div dir="ltr"><div>Hi!<br><br></div>I'd like to create an item group for a QGraphicsScene with this function:<br><div><div><div><br>QGraphicsItemGroup * QGraphicsScene::createItemGroup ( const QList<QGraphicsItem *> & items )<br>
<br></div><div>However, I don't know how to create a variable of type QList<QGraphicsItem*>. <br></div><div>I even can't find the class:<br></div><div><br>* (qt:qapropos "QList")<br>; No debug variables for current frame: using EVAL instead of EVAL-IN-FRAME.<br>
Class QListView<br>Class QListWidget<br>Class QListWidgetItem<br>Method QListView::QListView [7272]<br>Method QListView::QListView [7342]<br>Method QListView::~QListView [7356]<br>Method QListWidget::QListWidget [7364]<br>
Method QListWidget::QListWidget [7422]<br>Method QListWidget::~QListWidget [7426]<br>Method QListWidgetItem::QListWidgetItem [7427]<br>Method QListWidgetItem::QListWidgetItem [7428]<br>Method QListWidgetItem::QListWidgetItem [7429]<br>
Method QListWidgetItem::QListWidgetItem [7430]<br>Method QListWidgetItem::QListWidgetItem [7472]<br>Method QListWidgetItem::QListWidgetItem [7473]<br>Method QListWidgetItem::QListWidgetItem [7474]<br>Method QListWidgetItem::QListWidgetItem [7475]<br>
Method QListWidgetItem::QListWidgetItem [7476]<br>Method QListWidgetItem::QListWidgetItem [7477]<br>Method QListWidgetItem::~QListWidgetItem [7480]<br><br></div><div>I tried to call canvas's items() and see what's inside. Then I see<br>
<br>(#<QGraphicsItem 0x01FEB0B8> #<QGraphicsItem 0x01FEABB8>)<br><br></div><div>That's the two items I created, before calling items(). So I see CommonQt does some magic to convert QList to a lisp list.<br>
<br><div>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.<br>
</div></div><div></div><br></div><div>- Rujia<br><br></div></div></div>