listview problem (i need help)
Hi, it's me again
i want to make listview,where it add new item when i add an object for that
i define my model like that
in ogrewidget.cpp
Code:
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++;
}
}
}
and in my_interface.cpp, i create my list view
Code:
list_O
->setGeometry
(QRect(30,
210,
101,
31));
but it still do not make to me the list
what i forget to do
how i pass my list_view (in the class my_interface) to the add object in class ogrewidget?
Re: listview problem (i need help)
WHY CROSS POST WHEN YOU ARE GETTING RESPONSES?
http://www.qtforum.org/article/37916...-not-work.html
at least have the decency to make reference to the responses you have already had so that you dont waste other peoples' time going over old ground.
Quote:
listView =new QListView(list_O);
What are you trying to do??? That will make list_O, which is a toolbutton, the parent of the listview, and therefore the listview will be INSIDE the toolbutton!