QStringList items;
items << QObject::tr("Spring") << QObject::tr("Summer") << QObject::tr("Fall") <<QObject::tr("Winter");
//bool ok;
QString item = QInputDialog::getItem(NULL, QObject::tr("QInputDialog::getItem()"),
QObject::tr("Season:"), items, 0, false, &ok);
//if (ok && !item.isEmpty())
// itemLabel->setText(item);
QString templateName = QInputDialog::getText(NULL,QObject::tr("另存为模板"),QObject::tr("请输入模板名字:"),QLineEdit::Normal,QString(),&ok);
if(!ok)
{
return "";
}
时间: 2024-10-17 10:01:26