Results 1 to 2 of 2

Thread: QLineEdit doesn't recive any character

  1. #1
    Join Date
    Apr 2021
    Posts
    6
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QLineEdit doesn't recive any character

    Hello guys,

    I have got problem with QLineEdit class.
    I want to create lineedit object and it working, but if I running my program this input doesn't recive character that I press.
    I tried to use releaseKeyboard() method, setting focus on this object too, but this still doesn't working.

    My code:

    Qt Code:
    1. QLineEdit * nicknameField = new QLineEdit();
    2. nicknameField->setPlaceholderText("Enter your nickname");
    3. nicknameField->setGeometry(pxPos,260,200,30);
    4. scene->addWidget(nicknameField);
    To copy to clipboard, switch view to plain text mode 


    PS. If it can help I working on CLion IDE with Qt5 library on windows 10.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QLineEdit doesn't recive any character

    This line edit is clearly part of a larger construct that we cannot see.
    What would help is a small, self-contained program that demonstrates the problem. Generally doing this will make the problem disappear (i.e. the problem was elsewhere in your larger program) or become obvious.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. Replies: 0
    Last Post: 5th September 2019, 18:01
  2. Replies: 2
    Last Post: 9th July 2016, 11:59
  3. Recive the form post with QWebKit?
    By cochise in forum Newbie
    Replies: 4
    Last Post: 26th August 2009, 09:13
  4. QTcpSocekt dosent recive msg
    By Zergi in forum Qt Programming
    Replies: 5
    Last Post: 14th January 2008, 12:24
  5. how to get last character of QLineEdit
    By yagabey in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2008, 17:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.