标签:
SortDialog::SortDialog(QWidget *parent) :
QDialog(parent) {
setupUi(this);
groupBox_2->hide();
groupBox_3->hide();
layout()->setSizeConstraint(QLayout::SetFixedSize);
setColumnRange(‘A‘, ‘Z‘);
}
SortDialog::~SortDialog() {
}
void SortDialog::setColumnRange(QChar first, QChar last) {
primaryColumnComboBox->clear();
secondaryColumnComboBox->clear();
tertiaryColumnComboBox->clear();
secondaryColumnComboBox->addItem(tr("None"));
tertiaryColumnComboBox->addItem(tr("None"));
primaryColumnComboBox->setMinimumSize(secondaryColumnComboBox->sizeHint());
QChar ch = first;
while (ch <= last) {
primaryColumnComboBox->addItem(QString(ch));
secondaryColumnComboBox->addItem(QString(ch));
tertiaryColumnComboBox->addItem(QString(ch));
ch = ch.unicode() + 1;
}
}
http://www.cppblog.com/biao/archive/2008/03/17/44720.html
标签:
原文地址:http://www.cnblogs.com/findumars/p/5979187.html