QComboBox

QComboBox

#include "dialog.h"
#include "ui_dialog.h"
#include <QtCore>
#include <QtGui>
#include <QMessageBox> Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this); for(int i = 0; i < 8; i++)
{ ui->comboBox->addItem(QString::number(i)+"item");
}
} Dialog::~Dialog()
{
delete ui;
} void Dialog::on_pushButton_clicked()
{
QMessageBox::information(this,"Title",ui->comboBox->currentText());
}

  

上一篇:BZOJ2803[Poi2012]Prefixuffix——hash


下一篇:PHP优化小建议