Hi ,
ok , that's how i declare my object
class QmyWidget
: public QWidget,
public Ogre
::FrameListener {
Q_OBJECT
public:
~QmyWidget();
struct sphere
{
int num_sphere;
float x,y,z;
};
std::vector<Ogre::SceneNode *> sphereNodes;
class QmyWidget : public QWidget, public Ogre::FrameListener
{
Q_OBJECT
public:
QmyWidget(QWidget *parent = 0);
~QmyWidget();
struct sphere
{
int num_sphere;
float x,y,z;
};
std::vector<Ogre::SceneNode *> sphereNodes;
To copy to clipboard, switch view to plain text mode
and
void QmyWidget:: create_sphere()
{
std::string name("sphere_" + Ogre::StringConverter::toString(i));
Ogre::Entity *ent = mSceneMgr->createEntity( name,Ogre::SceneManager:: PT_SPHERE);
Ogre::SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode(name,pos);
}
void QmyWidget:: create_sphere()
{
std::string name("sphere_" + Ogre::StringConverter::toString(i));
Ogre::Entity *ent = mSceneMgr->createEntity( name,Ogre::SceneManager:: PT_SPHERE);
Ogre::SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode(name,pos);
}
To copy to clipboard, switch view to plain text mode
i want to display just the "name" in the tooltip
i do not yet write the code of the tooltip
But i tried to dsplay the name in the list view , it work , i added just this twi lines to my function "create_sphere"
emit itemAded(item);
QStandardItem *item=new QStandardItem(QString ("sphere %0").arg(num_sphere));
emit itemAded(item);
To copy to clipboard, switch view to plain text mode
Bookmarks