Hello all and thank you for allowing me the pleasure of asking my noob questions! I am learning by myself so it is nice to know there is a community of people working together! Here is my question.
void Edge
::on_slotSizeW_textChanged(const QString &arg1
) {
QString objName
= ui
->slotSizeW
->objectName
();
QString objValue
= ui
->slotSizeW
->text
();
QList<QListWidgetItem*> items = ui->profileSettingsList->selectedItems();
{
profileName.append(item->text());
QList<QListWidgetItem*> items = ui->slotList->selectedItems();
{
slotName.append(item->text());
settings.beginGroup(profileName);
settings.beginGroup(slotName);
settings.setValue(objName,objValue);
settings.endGroup();
qDebug() << objName;
}
}
}
void Edge::on_slotSizeW_textChanged(const QString &arg1)
{
QSettings settings("slots.ini",QSettings::IniFormat);
QString profileName;
QString slotName;
QString objName = ui->slotSizeW->objectName();
QString objValue = ui->slotSizeW->text();
QList<QListWidgetItem*> items = ui->profileSettingsList->selectedItems();
foreach(QListWidgetItem* item, items)
{
profileName.append(item->text());
QList<QListWidgetItem*> items = ui->slotList->selectedItems();
foreach(QListWidgetItem* item, items)
{
slotName.append(item->text());
settings.beginGroup(profileName);
settings.beginGroup(slotName);
settings.setValue(objName,objValue);
settings.endGroup();
qDebug() << objName;
}
}
}
To copy to clipboard, switch view to plain text mode
in this example is there a way to automatically reference the widget here:
QString objName
= ui
->slotSizeW
->objectName
();
QString objValue
= ui
->slotSizeW
->text
();
QString objName = ui->slotSizeW->objectName();
QString objValue = ui->slotSizeW->text();
To copy to clipboard, switch view to plain text mode
I want to be able to remove ui->slotSizeW and automatically return whichever widget is in focus. Possible? Thank you again
Bookmarks