Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QLineEdit not receiving any input

QLineEdit not receiving any input

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.0k Views 2 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.
  • F Offline
    F Offline
    feuer
    wrote on last edited by
    #1

    Hi,

    What might I be doing wrong with this QLineEdit? It's showing the cursor as expected on getting focus, but when it's focused and I'm mashing keyboard, it's not receiving any input :(

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

      Hi @feuer

      I am not sure at all but the source of the problem can be this line:

      activateWindow();

      Can you try to comment this line ?

      maybe there is a widget that will be place on top of your lol QLineEdit.

      1 Reply Last reply
      1
      • F Offline
        F Offline
        feuer
        wrote on last edited by
        #3

        Hi, thanks, but commenting that out did nothing :( In fact, when I first noticed that the property-editor dialog had a QLineEdit that received no input I tried to add that particular eventHandler. Afterwards I added the QLineEdit to tha mainwindow to ease testing and experimenting.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          That code alone seems pretty ok.
          If you create a default GUI project and paste

          QLineEdit *lol = new QLineEdit(this);
            lol->setFocus();
            lol->setPlaceholderText("Would you please capture events?");
            lol->setReadOnly(false);
          

          Does it then work ?

          1 Reply Last reply
          1
          • F Offline
            F Offline
            feuer
            wrote on last edited by
            #5

            It was because my half-finished openglwidget was eating my keyboard events. This commit fixed it.

            Thanks for the chance of rubber duck debugging :D

            1 Reply Last reply
            1

            • Login

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