UI doesn´t refresh on Android
-
wrote on 23 Sept 2024, 21:04 last edited by
Hi,
I just started building an app for android, but the behaviour is not what I expected.
I just added a button and a label to simply test something, and I deploy the app on my phone. With the button, I do:
void MainWindow::on_pushButton_pressed() { ui->label->setText("AAA"); ui->label->hide(); qDebug() << "AAA" << ui->label->text(); }
But the UI doesn´t refresh, the label doesn´t hide, and it doesn´t change text either, but the print shows that the text changed.
After that, I added another button:
void MainWindow::on_pushButton_2_clicked() { ui->label->show(); }
This button somehow "updates" all the UI, and qt throws a messaage: I ImeTracker: org.qtproject.example.untitled3:d03c1066: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
I´d like to understand what´s going on here and why is the UI not updating when I click the first button, many thanks to whoever can help me.
-
wrote on 24 Sept 2024, 09:11 last edited by
Are you using QtWidgets or QtQuick+QML ?
Seems like you're using QtWidgets which has never been intended to be used for mobile devices, which lead to creation of QtQuick and QML that are far better appropriate for those devices.
-
wrote on 24 Sept 2024, 14:43 last edited byThis post is deleted!
-
Are you using QtWidgets or QtQuick+QML ?
Seems like you're using QtWidgets which has never been intended to be used for mobile devices, which lead to creation of QtQuick and QML that are far better appropriate for those devices.
wrote on 24 Sept 2024, 15:04 last edited by Manu_NaFu@ankou29666 Thanks, I am indeed using QtWidgets.
I first tried to create QtQuick but it doesn´t create it for some reason, I click on finish and it doesn´t do anything.
EDIT: This is apparently due to some kwnon issues with windows 11.
Still, I belikeve the qwidget application should work? Not sure why the GUI doesn´t udpate.
-
wrote on 27 Sept 2024, 07:11 last edited by
I installed Qt 6.6.3 and and tried my C++ widget application.
The bugs in 6.7.2 was NOT there. So instead of rewriting in QML I continue with 6.6.3 for Android projects. -
wrote on 8 Oct 2024, 09:13 last edited by
Not solved in 6.8 :(