QToolBox(实现抽
屉效果)的简单实用
QToolBox的使用十分简单,但是不常用,在此记录一下。
简述
QToolBox类提供了一列选项卡式小部件项。
QToolBox *toolbox = new QToolBox(ui->centralwidget);
QLabel *label = new QLabel;
label->setText("111");
toolbox->addItem(label, tr("A"));
label = new QLabel;
label->setText("222");
toolbox->addItem(label, tr("B"));
label = new QLabel;
label->setText("333");
toolbox->addItem(label, tr("C"));
label = new QLabel;
label->setText("444");
toolbox->addItem(label, tr("D"));