Please try the following code:
#include <QApplication>
#include <QMainWindow>
#include <QToolBar>
int main(int argc, char **argv){
tb->addAction("a1");
tb->addAction("a2");
mw.addToolBar(Qt::BottomToolBarArea, tb);
mw.show();
return app.exec();
}
#include <QApplication>
#include <QMainWindow>
#include <QToolBar>
int main(int argc, char **argv){
QApplication app(argc, argv);
QMainWindow mw;
QToolBar *tb = new QToolBar(&mw);
tb->addAction("a1");
tb->addAction("a2");
mw.addToolBar(Qt::BottomToolBarArea, tb);
mw.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks