| 34 | } |
| 35 | |
| 36 | void KeyValueListEdit::Add() |
| 37 | { |
| 38 | StringVariable key; |
| 39 | StringVariable value; |
| 40 | bool accepted = AskForKeyValue(key, value); |
| 41 | if (!accepted) { |
| 42 | return; |
| 43 | } |
| 44 | |
| 45 | AppendListEntryWidget(key, value); |
| 46 | _stringList << key << value; |
| 47 | |
| 48 | // Delay resizing to make sure the list viewport was already updated |
| 49 | QTimer::singleShot(0, this, [this]() { UpdateListSize(); }); |
| 50 | |
| 51 | StringListChanged(_stringList); |
| 52 | } |
| 53 | |
| 54 | void KeyValueListEdit::Remove() |
| 55 | { |