Results 1 to 6 of 6

Thread: Tool keyboard wont appear when I click on line edit again

  1. #1
    Join Date
    May 2013
    Posts
    47
    Qt products
    Qt5
    Platforms
    Windows

    Default Tool keyboard wont appear when I click on line edit again

    Hello All, I am new to Qt and I am trying to make a program where when i click the lineedit , a pop up box would show up below . I am able to do that by using
    Qt Code:
    1. void MainWindow::on_NRIC_cursorPositionChanged(int arg1, int arg2){
    2. popupKeyboard();//Showing the popup keyboard
    3. }
    To copy to clipboard, switch view to plain text mode 

    But after i close the popup and click on the QLineEdit , The popup does not show at all .

    There is another problem , When the text fill is filled with letters,Whenever I press Enter on the popup menu, it would take many clicks to close

    Qt Code:
    1. QFrame* popupNumpadBed = new QFrame(this, Qt::Tools| Qt::FramelessWindowHint);
    2. popupNumpadBed->resize(600,500);
    3. popupNumpadBed->setAttribute( Qt::WA_TranslucentBackground );
    4. QPushButton *BedEnter= new QPushButton( popupNumpadBed );
    5. BedEnter->setText("Enter");
    6. BedEnter->setGeometry(450,256.66666, 150, 53.33333);
    7. BedEnter->setFocus();
    8. connect(BedEnter, SIGNAL(clicked()), popupNumpadBed, SLOT(hide()));
    To copy to clipboard, switch view to plain text mode 

    Please Help Thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Tool keyboard wont appear when I click on line edit again

    cursorPositionChanged() is not triggered when you click anything but when... cursor position changes. If you want to have a virtual keyboard then the proper approach is to implement an input context plugin.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2013
    Posts
    47
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Tool keyboard wont appear when I click on line edit again

    Quote Originally Posted by wysota View Post
    cursorPositionChanged() is not triggered when you click anything but when... cursor position changes. If you want to have a virtual keyboard then the proper approach is to implement an input context plugin.
    Thanks for the immediate response , Mind if i ask , How do we use the input context plugin method ? I mean how do we use it ?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Tool keyboard wont appear when I click on line edit again

    Qt will take care of using it. You just need to provide it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2013
    Posts
    47
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Tool keyboard wont appear when I click on line edit again

    I researched about inputcontextplugins but found minimal relevant searches . I tried including QInputContextplugins but to no avail , i cant get it to build . And for the codings of inputcontext pluggin, I am not really sure of how to implement it . Are you able to show me an example so i can read into it ?Thanks

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Tool keyboard wont appear when I click on line edit again

    As far as I remember there is an example in the docs on how to implement a simple input context plugin.

    Here you go: http://qt-project.org/doc/qt-4.8/tools-inputpanel.html
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTableView line edit clears the text on edit
    By PlasticJesus in forum Qt Programming
    Replies: 5
    Last Post: 14th March 2015, 19:06
  2. Program wont start - Wont even enter main()
    By ComServant in forum General Programming
    Replies: 5
    Last Post: 8th January 2011, 03:44
  3. Replies: 3
    Last Post: 26th August 2010, 08:57
  4. Tool Button keyboard focus?
    By ts230 in forum Qt Programming
    Replies: 1
    Last Post: 6th April 2010, 05:31
  5. Replies: 8
    Last Post: 15th May 2007, 09:21

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.