Ok , i define my model like that
in ogrewidget.cpp
QStandardItemModel* OgreWidget
::add_object(/*Ogre::Real*/double offsetX ,
/*Ogre::Real*/double offsetY
) {
.................................................
int i=1;
for(itr = result.begin() ;itr != result.end();++itr)
{
if(itr->movable)
{
MarkerNode->_setDerivedPosition(mouseRay.getPoint(itr->distance));
MarkerNode->setScale(0.1f, 0.1f, 0.1f);
model->appendRow(item);
i++;
}
}
return model;
}
QStandardItemModel* OgreWidget::add_object(/*Ogre::Real*/double offsetX ,/*Ogre::Real*/double offsetY)
{
.................................................
model= new QStandardItemModel();
int i=1;
for(itr = result.begin() ;itr != result.end();++itr)
{
if(itr->movable)
{
MarkerNode->_setDerivedPosition(mouseRay.getPoint(itr->distance));
MarkerNode->setScale(0.1f, 0.1f, 0.1f);
QStandardItem *item=new QStandardItem(QString ("Marker %0").arg(i));
model->appendRow(item);
i++;
}
}
return model;
}
To copy to clipboard, switch view to plain text mode
and in my_interface.cpp
list_O
->setGeometry
(QRect(30,
210,
101,
31));
list_O = new QToolButton(page_13);
list_O->setGeometry(QRect(30, 210, 101, 31));
list_O->setText(QApplication::translate("MainWindow", "Object Liste", 0, QApplication::UnicodeUTF8));
listView =new QListView(list_O);
To copy to clipboard, switch view to plain text mode
but it still do not make to me the list
Bookmarks