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. Show keyboard when QTextEdit is activated
QtWS25 Last Chance

Show keyboard when QTextEdit is activated

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 5.2k 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.
  • I Offline
    I Offline
    ivanicy
    wrote on 27 Oct 2017, 06:19 last edited by
    #1

    Hello!

    I am developing a tablet application with Windows 10. I have some data inputs and I want to show the keyboard when I push on them. I don't know why, but in some cases, the keyboard appears automatically and in other cases it doesn't appear.

    Do you know how to fix it?

    Thank you very much!!

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 27 Oct 2017, 07:26 last edited by
      #2

      Are you using QtWidgets or QtQuick (QML)?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      I 1 Reply Last reply 27 Oct 2017, 07:26
      1
      • V VRonin
        27 Oct 2017, 07:26

        Are you using QtWidgets or QtQuick (QML)?

        I Offline
        I Offline
        ivanicy
        wrote on 27 Oct 2017, 07:26 last edited by
        #3

        @VRonin I am using QtWidgets

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mostefa
          wrote on 7 Nov 2017, 07:51 last edited by
          #4

          Hi @ivanicy

          Which Qt version are you using?

          Are you using the Qt Virtual Keyboard?
          How are you displaying your keyboard , can you share a sample code?

          I 1 Reply Last reply 7 Nov 2017, 11:29
          1
          • M mostefa
            7 Nov 2017, 07:51

            Hi @ivanicy

            Which Qt version are you using?

            Are you using the Qt Virtual Keyboard?
            How are you displaying your keyboard , can you share a sample code?

            I Offline
            I Offline
            ivanicy
            wrote on 7 Nov 2017, 11:29 last edited by
            #5

            @mostefa No, I want to show the system keyboard ( I am running the program in a tablet). I have observed that if the echoMode property of the QLineEdit is "password" when I push on it, the windows keyboard appears automatically, but, if the echoMode property is any other, the keyboard doesn't appear.

            M 1 Reply Last reply 7 Nov 2017, 12:59
            0
            • I ivanicy
              7 Nov 2017, 11:29

              @mostefa No, I want to show the system keyboard ( I am running the program in a tablet). I have observed that if the echoMode property of the QLineEdit is "password" when I push on it, the windows keyboard appears automatically, but, if the echoMode property is any other, the keyboard doesn't appear.

              M Offline
              M Offline
              mostefa
              wrote on 7 Nov 2017, 12:59 last edited by
              #6

              @ivanicy said in Show keyboard when QTextEdit is activated:

              @mostefa No, I want to show the system keyboard ( I am running the program in a tablet). I have observed that if the echoMode property of the QLineEdit is "password" when I push on it, the windows keyboard appears automatically, but, if the echoMode property is any other, the keyboard doesn't appear.

              Ok ,

              I don't know if what i will describe will help you , cause in my case i was not using android , i was a virtual keyboard on imx6 embedded card,

              The Qt Doc speak about RequestSoftwareInputPanel

              This enum describes under what circumstances a software input panel will be requested by input capable widgets.

              to know how to use this enum , you can get inspired from this post:

              https://forum.qt.io/topic/20313/how-to-set-qstyle-requestsoftwareinputpanel-to-qstyle-rsip_onmouseclick

              I hope this can help you!

              I have just another question :

              Have you the problem with all input widgets , (such as : QLineEdit, QTextEdit..) or just with QTextEdit?

              I 1 Reply Last reply 8 Nov 2017, 07:33
              0
              • M mostefa
                7 Nov 2017, 12:59

                @ivanicy said in Show keyboard when QTextEdit is activated:

                @mostefa No, I want to show the system keyboard ( I am running the program in a tablet). I have observed that if the echoMode property of the QLineEdit is "password" when I push on it, the windows keyboard appears automatically, but, if the echoMode property is any other, the keyboard doesn't appear.

                Ok ,

                I don't know if what i will describe will help you , cause in my case i was not using android , i was a virtual keyboard on imx6 embedded card,

                The Qt Doc speak about RequestSoftwareInputPanel

                This enum describes under what circumstances a software input panel will be requested by input capable widgets.

                to know how to use this enum , you can get inspired from this post:

                https://forum.qt.io/topic/20313/how-to-set-qstyle-requestsoftwareinputpanel-to-qstyle-rsip_onmouseclick

                I hope this can help you!

                I have just another question :

                Have you the problem with all input widgets , (such as : QLineEdit, QTextEdit..) or just with QTextEdit?

                I Offline
                I Offline
                ivanicy
                wrote on 8 Nov 2017, 07:33 last edited by
                #7

                @mostefa Thank you for your answer. I am running the app in a Windows tablet. The problem is with all input widgets. Only when this widgets are password echoMode, it works correctly. I will try your solution, and I hope it to work!

                M 1 Reply Last reply 8 Nov 2017, 07:46
                0
                • I ivanicy
                  8 Nov 2017, 07:33

                  @mostefa Thank you for your answer. I am running the app in a Windows tablet. The problem is with all input widgets. Only when this widgets are password echoMode, it works correctly. I will try your solution, and I hope it to work!

                  M Offline
                  M Offline
                  mostefa
                  wrote on 8 Nov 2017, 07:46 last edited by mostefa 11 Aug 2017, 07:46
                  #8

                  @ivanicy said in Show keyboard when QTextEdit is activated:

                  @mostefa Thank you for your answer. I am running the app in a Windows tablet. The problem is with all input widgets. Only when this widgets are password echoMode, it works correctly. I will try your solution, and I hope it to work!

                  Hi again @ivanicy

                  I think that you are having this Qt bug in windows tablet !

                  1 Reply Last reply
                  0
                  • Vinod KuntojiV Offline
                    Vinod KuntojiV Offline
                    Vinod Kuntoji
                    wrote on 8 Nov 2017, 09:29 last edited by
                    #9

                    @ivanicy ,

                    Whenever if you click inside the textedit, application will show the on screen keyboard.
                    Try this code.

                    MainWindow::MainWindow(QWidget *parent) :
                    QMainWindow(parent),
                    ui(new Ui::MainWindow)
                    {
                    ui->setupUi(this);
                    connect(ui->textEdit,SIGNAL(selectionChanged()),this,SLOT(SLT_TextEditActivated()));
                    connect(this,SIGNAL(SGN_ShowKeyboard()),this,SLOT(SLT_ShowKeyboard()));

                    }
                    void MainWindow::SLT_ShowKeyboard(){
                    qDebug()<<"Showing Keyboard"<<endl;
                    QProcess *myProcess = new QProcess(this);
                    myProcess->startDetached("C:\Windows\System32\osk.exe");
                    }

                    void MainWindow::SLT_TextEditActivated(){
                    qDebug()<<"TextEdit Activated"<<endl;
                    emit SGN_ShowKeyboard();
                    }

                    C++, Qt, Qt Quick Developer,
                    PthinkS, Bangalore

                    I 1 Reply Last reply 8 Nov 2017, 12:23
                    1
                    • Vinod KuntojiV Vinod Kuntoji
                      8 Nov 2017, 09:29

                      @ivanicy ,

                      Whenever if you click inside the textedit, application will show the on screen keyboard.
                      Try this code.

                      MainWindow::MainWindow(QWidget *parent) :
                      QMainWindow(parent),
                      ui(new Ui::MainWindow)
                      {
                      ui->setupUi(this);
                      connect(ui->textEdit,SIGNAL(selectionChanged()),this,SLOT(SLT_TextEditActivated()));
                      connect(this,SIGNAL(SGN_ShowKeyboard()),this,SLOT(SLT_ShowKeyboard()));

                      }
                      void MainWindow::SLT_ShowKeyboard(){
                      qDebug()<<"Showing Keyboard"<<endl;
                      QProcess *myProcess = new QProcess(this);
                      myProcess->startDetached("C:\Windows\System32\osk.exe");
                      }

                      void MainWindow::SLT_TextEditActivated(){
                      qDebug()<<"TextEdit Activated"<<endl;
                      emit SGN_ShowKeyboard();
                      }

                      I Offline
                      I Offline
                      ivanicy
                      wrote on 8 Nov 2017, 12:23 last edited by
                      #10

                      @Vinod-Kuntoji It could be a temporal solution. This solution shows this keyboard:

                      0_1510143694966_teclado malo.png

                      but, it shows the administrator window before open it. I want to show the pop-up keyboard:

                      0_1510143761725_teclado bueno.png

                      that is shown automatically. This keyboard only appears when the QLineEdit has "password" echoMode.

                      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