Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android "PlainTextField UI Problem"
Forum Updated to NodeBB v4.3 + New Features

Android "PlainTextField UI Problem"

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 110 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ademmlerA Offline
    ademmlerA Offline
    ademmler
    wrote on last edited by
    #1

    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.

    IMG_4980.jpeg

    IMG_4981.jpeg

    // 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);
        }
    }
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved