parent
4b1b062388
commit
3a57d1018e
6 changed files with 68 additions and 56 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "Utils.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
#include <QDesktopWidget>
|
||||
#include <QSettings>
|
||||
#include <QTextDocument>
|
||||
|
|
@ -400,3 +401,14 @@ utils::centerWidget(QWidget *widget, QWidget *parent)
|
|||
|
||||
widget->move(findCenter(QApplication::desktop()->screenGeometry()));
|
||||
}
|
||||
|
||||
void
|
||||
utils::restoreCombobox(QComboBox *combo, const QString &value)
|
||||
{
|
||||
for (auto i = 0; i < combo->count(); ++i) {
|
||||
if (value == combo->itemText(i)) {
|
||||
combo->setCurrentIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue