QToolButton *button_all = new QToolButton();
button_all->setText(tr("鞋店总情况"));
button_all->setIcon(QIcon(":/image/1.png"));
button_all->setAutoRaise(true);
button_all->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QToolButton *button_buy = new QToolButton();
button_buy->setText(tr("入库"));
button_buy->setIcon(QPixmap(":/image/1.ico"));
button_buy->setAutoRaise(true);
button_buy->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(button_all);
layout->addWidget(button_buy);
ui->toolBox->setCurrentIndex(0);
ui->toolBox->currentWidget()->setLayout(layout);
ui->toolBox->setItemText(0, tr("鞋店"));
ui->toolBox->setItemIcon(0, QIcon(":/image/1.png"));