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. UI doesn´t refresh on Android
Forum Updated to NodeBB v4.3 + New Features

UI doesn´t refresh on Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 800 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.
  • M Offline
    M Offline
    Manu_NaFu
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ankou29666
      wrote on last edited by
      #2

      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.

      M 1 Reply Last reply
      0
      • M Offline
        M Offline
        Manu_NaFu
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • A ankou29666

          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.

          M Offline
          M Offline
          Manu_NaFu
          wrote on last edited by Manu_NaFu
          #4

          @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.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MartinGU
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MartinGU
              wrote on last edited by
              #6

              Not solved in 6.8 :(

              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