bhogasena
29th January 2009, 14:42
hi,
i have derived one class from QWidget. in derived class i add QGlwidget in that irendered some objects. now i would like to add toolbar to the widget.
in derived class i declare objects for QAction and QToolbar
i have written code like
code:
void Window::createToolBars()
{
zoomToolBar = addToolBar(tr("Zoom"));
zoomToolBar->addAction(zoominAct);
zoomToolBar->addAction(zoomoutAct);
zoomToolBar->addAction(resetAct);
mouseToolBar = addToolBar(tr("Mouse"));
mouseToolBar->addAction(mouseAct);
}
it showing error as "addToolBar" is undeclared identifier.
can any one help me so that i'll be thankful to you.
thanks and regards
k. bhogasena reddy
i have derived one class from QWidget. in derived class i add QGlwidget in that irendered some objects. now i would like to add toolbar to the widget.
in derived class i declare objects for QAction and QToolbar
i have written code like
code:
void Window::createToolBars()
{
zoomToolBar = addToolBar(tr("Zoom"));
zoomToolBar->addAction(zoominAct);
zoomToolBar->addAction(zoomoutAct);
zoomToolBar->addAction(resetAct);
mouseToolBar = addToolBar(tr("Mouse"));
mouseToolBar->addAction(mouseAct);
}
it showing error as "addToolBar" is undeclared identifier.
can any one help me so that i'll be thankful to you.
thanks and regards
k. bhogasena reddy