qt: Ensure visual feedback when a text label gets focus
qt/pinentrydialog.cpp (class TextLabel): New.
qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Set text format
of all text labels to PlainText. Change all text labels that shall be
able to receive focus from QLabel to TextLabel.
(PinEntryDialog::setFormattedPassphrase): Set text format of
mFormattedPassphraseHint to RichText.
Unfortunately, many (all?) Qt styles do not give visual feedback if a
(text) label gets keyboard focus. As workaround, we select the text of
the label that got focus. We set the text format of all text labels
initially to plain text. This prevents the labels from accidentally
interpreting their text as rich text and enables us to determine the
"visual" length of their texts.
- GnuPG-bug-id: T5863