comparison widgets/PropertyBox.cpp @ 779:037a7c22bec8 tonioni

Replace setCurrentText (which doesn't appear to exist in qt4) with setCurrentIndex
author Chris Cannam
date Fri, 23 May 2014 16:48:06 +0100
parents 336ccf8fc3f8
children e4773943c9c1
comparison
equal deleted inserted replaced
777:c2291e22bf0c 779:037a7c22bec8
766 dialog->setComboBoxItems(clips); 766 dialog->setComboBoxItems(clips);
767 767
768 dialog->setLabelText(tr("Set playback clip:")); 768 dialog->setLabelText(tr("Set playback clip:"));
769 769
770 QComboBox *cb = dialog->findChild<QComboBox *>(); 770 QComboBox *cb = dialog->findChild<QComboBox *>();
771 if (cb) cb->setCurrentText(clip); 771 if (cb) {
772 for (int i = 0; i < cb->count(); ++i) {
773 if (cb->itemText(i) == clip) {
774 cb->setCurrentIndex(i);
775 }
776 }
777 }
772 778
773 connect(dialog, SIGNAL(textValueChanged(QString)), 779 connect(dialog, SIGNAL(textValueChanged(QString)),
774 this, SLOT(playClipChanged(QString))); 780 this, SLOT(playClipChanged(QString)));
775 781
776 if (dialog->exec() == QDialog::Accepted) { 782 if (dialog->exec() == QDialog::Accepted) {