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. QLineEdit in Android - no text visual
Forum Update on Monday, May 27th 2025

QLineEdit in Android - no text visual

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 5 Posters 692 Views
  • 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
    MartinGU
    wrote on last edited by
    #1

    Qt 6.7.2, QtCreator 14.0.1, Linux Mint 22
    Setup Android according to documentation
    Create a new Android project, QtWidget Application.
    Put a QLineEdit on mainwindow.ui
    Run in Android Emulator or in physical phone (tested three different)

    Type something into the QLineEdit, no text shown, something is entered but its like white text on white background. Changing color does not help!

    Rotate screen and the text entered will be visible.

    Is this just me or a horrible bug???

    1 Reply Last reply
    1
    • M Offline
      M Offline
      Morgatte
      wrote on last edited by Morgatte
      #2

      Yes, I believe it's a bug. It's not limited to a simple QLine. Regardless of the widget used, it's not updated on the upper half of the phone's screen. If you move it down to the lower part, you'll see that it works again.

      This is a real issue, and I still don't have a solution...

      To fix this bug, I use now Qt 6.8 but nothing has changed.

      M 1 Reply Last reply
      1
      • M Morgatte

        Yes, I believe it's a bug. It's not limited to a simple QLine. Regardless of the widget used, it's not updated on the upper half of the phone's screen. If you move it down to the lower part, you'll see that it works again.

        This is a real issue, and I still don't have a solution...

        To fix this bug, I use now Qt 6.8 but nothing has changed.

        M Offline
        M Offline
        MartinGU
        wrote on last edited by
        #3

        So this is how "well" they test the code before they release it...
        Makes Qt more or less useless on Android.

        Why try to report that some settings does not save in configuring an Android project when they cannot even handle widgets right...

        And no better on 6.8 then?

        @Morgatte said in QLineEdit in Android - no text visual:

        Yes, I believe it's a bug. It's not limited to a simple QLine. Regardless of the widget used, it's not updated on the upper half of the phone's screen. If you move it down to the lower part, you'll see that it works again.

        This is a real issue, and I still don't have a solution...

        To fix this bug, I use now Qt 6.8 but nothing has changed.

        1 Reply Last reply
        1
        • M Offline
          M Offline
          mvuori
          wrote on last edited by
          #4

          Qt can be usefull with Android. One just needs to pick a version that has the least number of serious bugs - and bugs that can be lived with. For some, it might still mean using a 5.x version...

          1 Reply Last reply
          0
          • Axel SpoerlA Offline
            Axel SpoerlA Offline
            Axel Spoerl
            Moderators
            wrote on last edited by
            #5

            I fixed a bunch of bugs in the Android backing store and also in text edit fields. Haven’t come across this, but it absolutely sounds like a bug. Please boil it down to a simple reproducer that has no more than a few lines. Feel free to report a bug as well. I’ll look into it.

            Software Engineer
            The Qt Company, Oslo

            M 1 Reply Last reply
            2
            • Axel SpoerlA Axel Spoerl

              I fixed a bunch of bugs in the Android backing store and also in text edit fields. Haven’t come across this, but it absolutely sounds like a bug. Please boil it down to a simple reproducer that has no more than a few lines. Feel free to report a bug as well. I’ll look into it.

              M Offline
              M Offline
              MartinGU
              wrote on last edited by
              #6

              @Axel-Spoerl said in QLineEdit in Android - no text visual:

              I fixed a bunch of bugs in the Android backing store and also in text edit fields. Haven’t come across this, but it absolutely sounds like a bug. Please boil it down to a simple reproducer that has no more than a few lines. Feel free to report a bug as well. I’ll look into it.

              QTBUG-128794

              Axel SpoerlA 1 Reply Last reply
              0
              • M MartinGU

                @Axel-Spoerl said in QLineEdit in Android - no text visual:

                I fixed a bunch of bugs in the Android backing store and also in text edit fields. Haven’t come across this, but it absolutely sounds like a bug. Please boil it down to a simple reproducer that has no more than a few lines. Feel free to report a bug as well. I’ll look into it.

                QTBUG-128794

                Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by
                #7

                Please boil it down to a simple reproducer that has no more than a few lines.

                The reproducer is missing in the ticket.
                Please add an archive, that can be downloaded, compiled, deployed and run out of the box.

                Software Engineer
                The Qt Company, Oslo

                1 Reply Last reply
                0
                • testmonkeyT testmonkey referenced this topic on
                • ademmlerA Offline
                  ademmlerA Offline
                  ademmler
                  wrote on last edited by ademmler
                  #8

                  Hi there,

                  I ran into the same/similar issue. Using Qt for Android 6.8.2, BulidTool 34, SDK 35.

                  I tried PlainTextEdit, LineEdit and TextEdit ... all have the same issue.
                  You need to type arround 20-30 Characters, after they start to appear ...
                  I took a photo to illustrate this. Any hint what to do?

                  After rotating the tablet, the letters are appearing.
                  QTextEdit::update does not help.
                  Is there a way to force textFiled or full screen update?

                  I also tried to use connect and update in the slot:

                  connect( textFiled, &QTextEdit::textChanged, this, &MyTalker::onTextChanged);
                  void MyTalker::onTextChanged()
                  {
                      ui->textEdit->ensureCursorVisible();
                      ui->textEdit->update();
                  
                      QApplication::processEvents();
                  }
                  

                  Bug.jpeg

                  1 Reply Last reply
                  0
                  • ademmlerA Offline
                    ademmlerA Offline
                    ademmler
                    wrote on last edited by ademmler
                    #9

                    I found at least a workaround. I do a full update, each time the Text has changed.
                    For my small application this works. At least it is a workaround ...

                    void MyTalker::on_plainTextEdit_cursorPositionChanged() {
                        this->update();
                    }
                    

                    Maybe this is helpful for others with such issues ...

                    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