I want the same slots for all the toolbars and now it's working great.
Thanks again for the help!
Something like
{
QToolBar *tb
= parent
->addToolBar
("test");
QAction *actionPrint
= tb
->addAction
( QObject::tr("Print Record"),
this,
SLOT(on_actionPrint_triggered
()));
actionPrint
->setIcon
(QPixmap(":/Images/printer.bmp"));
actionPrint
->setText
(QObject::tr("Print Record"));
actionPrint
->setToolTip
(QObject::tr("Print Record"));
// ...
}
void MainWindow::CreateToolBar( QMainWindow *parent )
{
QToolBar *tb = parent->addToolBar("test");
QAction *actionPrint = tb->addAction( QObject::tr("Print Record"), this, SLOT(on_actionPrint_triggered()));
actionPrint->setIcon(QPixmap(":/Images/printer.bmp"));
actionPrint->setText(QObject::tr("Print Record"));
actionPrint->setToolTip(QObject::tr("Print Record"));
// ...
}
To copy to clipboard, switch view to plain text mode
Bookmarks