QString presetText = QInputDialog::getText(nullptr, tr("PTZOptics"), tr("Preset #4 Name:"), QLineEdit::Normal, ui->mem1->text(), &ok); That "mem1->text()" should be "mem4->text()". This has been annoying us for a while.