Hi
I have subclassed from both H3DWindowNode and QWidget. The first one is because of we have to and the second one is because i wanted to have the subclass set as central widget of the main window. Now Both the class has the width and height parameter and i guess i need to be specific when it comes to changing any of its parameter. In the main window header file i have declared a reference pointer as follows:
//reference to the subclass of the H3DWindowNode
//please do not confuse with the glcanvas
MyH3DCanvasWindow *m_glWindow;
//reference to the subclass of the H3DWindowNode
//please do not confuse with the glcanvas
MyH3DCanvasWindow *m_glWindow;
To copy to clipboard, switch view to plain text mode
And MyH3DCanvaWindow has the following structure:
class MyH3DCanvasWindow
: public H3D
::H3DWindowNode,
public QWidget{
.....................
.....................
.....................
};
class MyH3DCanvasWindow : public H3D::H3DWindowNode, public QWidget
{
.....................
.....................
.....................
};
To copy to clipboard, switch view to plain text mode
And i want to access the width and height parameter of one of the superclasses - in this case H3DWindowNode. I tried it as follows:
int w = sizeHint().width();
int h = sizeHint().height();
//set width and height of the glwindow
m_glWindow->width->setValue(w);// the width is specific to H3DWindowNode - Should we put the suggested scope resolution operator before width
m_glWindow->height->setValue(h);
int w = sizeHint().width();
int h = sizeHint().height();
//set width and height of the glwindow
m_glWindow->width->setValue(w);// the width is specific to H3DWindowNode - Should we put the suggested scope resolution operator before width
m_glWindow->height->setValue(h);
To copy to clipboard, switch view to plain text mode
I tried as follows and it compiles fine , but i do not get the aspect of it. Any explanation ?
m_glWindow->H3DWindowNode::width->setValue(w);
m_glWindow->H3DWindowNode::height->setValue(h);
m_glWindow->H3DWindowNode::width->setValue(w);
m_glWindow->H3DWindowNode::height->setValue(h);
To copy to clipboard, switch view to plain text mode
Thanks a lot folks for being with me
Regards
Sajjad
Bookmarks