Android "PlainTextField UI Problem"
Unsolved
Mobile and Embedded
-
Hi there,
I have a strange Problem, which appears only on Android my Android device with Android Version 14.
When I test the code on iOS or MAcIntel everything works as expected. Qt 6.7 with build Plattform android-34.I am creating a small app, which takes a text and uses text2speech in order to speak this text.
Because this app is ment for handicaped people I created my own minimal keyboard layout.
When I type a text it becames visibel after 4 characters had been typed - not before.// Create QButtons for letters A to Z for (int i = 0; i < 26; ++i) { char nMyChar = static_cast<char>('A' + i); QChar letter = char(nMyChar); QPushButton *button = new QPushButton(letter); //button->setFixedSize(buttonSize); button->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); button->setFont(customFont); layout->addWidget(button, i / 10, i % 10); connect(button, &QPushButton::clicked, this, &MyTalker::onButtonClicked); }
void MyTalker::onButtonClicked() { QPushButton *clickedButton = qobject_cast<QPushButton *>(sender()); if (clickedButton && clickedButton->objectName() != "pushButtonClear" && clickedButton->objectName() != "pushButtonSpace") { QString buttonText = clickedButton->text(); QString currentText = textField->toPlainText(); textField->setPlainText(currentText + buttonText); } }