Answer the question
In order to leave comments, you need to log in
How to put value from qcombobox into Russian?
Hello, there is a ComboBox
in it 3 values, all in Russian.
by pressing the button It is necessary to write to the settings file what is now in the comboBox.
QSettings *dbsett = new QSettings("default.ini",QSettings::IniFormat);
//тут получение значения из бокса
QString nu = ui->comboBox->currentText().toUtf8();
dbsett->setValue("user/nameuser", nu);
dbsett->sync();
QTextCodec *codec = QTextCodec::codecForName("Utf8");
QTextCodec::setCodecForLocale(codec);
QString::fromLocal8Bit
Answer the question
In order to leave comments, you need to log in
QSettings *dbsett = new QSettings("default.ini",QSettings::IniFormat);
dbsett->setIniCodec("UTF-8");
// get value from box here
QString nu = ui->comboBox->currentText();
dbsett->setValue("user/nameuser", nu);
dbsset->sync();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question