• 6022阅读
  • 3回复

我如何声明指针对象数组? [复制链接]

上一主题 下一主题
离线y383564500
 
只看楼主 倒序阅读 楼主  发表于: 2009-02-21
— 本帖被 XChinux 执行加亮操作(2009-02-22) —
关键词: QT4
我如何声明指针对象数组啊?或者我用QList容器来装这个指针对象?
离线weizhy
只看该作者 1楼 发表于: 2009-02-21
推荐后者,在用Qt开发的时候,我基本上已经不用数组了,有这么好的集合函数,为什么不用呢?
离线y383564500
只看该作者 2楼 发表于: 2009-03-01
可我还不了解这些容器的用法,if (PlotItem *plot = qgraphicsitem_cast<PlotItem*>(item)),我就不明白这其中的用意
离线weizhy
只看该作者 3楼 发表于: 2009-03-02
T qgraphicsitem_cast ( QGraphicsItem * item )
Returns the given item cast to type T if item is of type T; otherwise, 0 is returned.
Note: To make this function work correctly with custom items, reimplement the {QGraphicsItem::}{type()} function for each custom QGraphicsItem subclass.
快速回复
限100 字节
 
上一个 下一个