Oh..I have never used settings before,now I watched a YT tutorial on these..but I can't see to get how to impletment it to qlineedit.
http://www.youtube.com/watch?v=TNIkeFfzH-g
Added after 16 minutes:
Anyway did this.
void Table::loadSettings()
{
set.beginGroup("setting");
QString text
= set.
value("text").
toString();
ui->le->setText(text);
set.endGroup();
}
void Table::saveSettings()
{
set.beginGroup("setting");
set.setValue("text", ui->le->text());
set.endGroup();
}
void Table::on_load_tbn_clicked()
{
loadSettings();
}
void Table::on_save_btn_clicked()
{
saveSettings();
}
//Plus called loadSettings in constr.
void Table::loadSettings()
{
QSettings set("iWhor","whor");
set.beginGroup("setting");
QString text = set.value("text").toString();
ui->le->setText(text);
set.endGroup();
}
void Table::saveSettings()
{
QSettings set("iWhor","whor");
set.beginGroup("setting");
set.setValue("text", ui->le->text());
set.endGroup();
}
void Table::on_load_tbn_clicked()
{
loadSettings();
}
void Table::on_save_btn_clicked()
{
saveSettings();
}
//Plus called loadSettings in constr.
To copy to clipboard, switch view to plain text mode
Thank you all and please lock thread!
Added after 27 minutes:
Acuualy I'm not 100$% done.
This ssems tow work only once and doesn't let me to edit the text later.
However this si what I need.Among the other I need to edit text every now and then.How to?
Bookmarks