十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
1,QComboBox
connect(ui.load_combobox, SIGNAL(currentIndexChanged(int)), this, SLOT(load_sel(int)));
bool
ar_editor_window,::load_sel(int
index)
{
//int seleitem = ui.load_combobox->currentIndex();
bool rt = false;
switch (index)
{
case 0:
;
break;
case 1:
;
break;
default:
break;
}
return rt;
}
2,按钮菜单
_load_button = new
QPushButton()
_load_menu = new
QMenu();
_load_model_action = new QAction(_load_menu);
_load_pack_action = new QAction(_load_menu);
_load_menu->addAction(_load_model_action);
_load_menu->addAction(_load_pack_action);
_load_button->setMenu(_load_menu);
//remove_watermarks_button->setStyleSheet("QPushButton::menu-indicator{image:None;}");//去掉下拉三角
_load_button->setText(QStringLiteral ("导入"));
_load_model_action->setText(QStringLiteral("导入模型"));
_load_pack_action->setText(QStringLiteral("导入资源包"));
connect(_load_model_action, SIGNAL(triggered()), this, SLOT(load_model()));
connect(_load_pack_action, SIGNAL(triggered()), this, SLOT(load_pack()));