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. Device Virtual Keyboard
QtWS25 Last Chance

Device Virtual Keyboard

Scheduled Pinned Locked Moved Mobile and Embedded
11 Posts 5 Posters 6.6k 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.
  • K Offline
    K Offline
    kkrzewniak
    wrote on last edited by
    #1

    Hi.
    Does anybody know of a way to bring up the devices virtual keyboard.
    Thanks.

    Me, Grimlock, not "nice dino". ME BASH BRAINS!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      What devices exactly? Common mobile devices or specific embedded?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kkrzewniak
        wrote on last edited by
        #3

        Common mobile. Symbian/MeeGo

        Me, Grimlock, not "nice dino". ME BASH BRAINS!

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

          Not sure about symbian/meego (still can't compile app for symbian, hehe), but I thought that it should be done automatically when needed. At android-lighthouse week ago or so keyboard autoopening added too.

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

            Have you tried raising a RequestSoftwareInputPanel event?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kkrzewniak
              wrote on last edited by
              #6

              Well the thing is I need to make my own GUI element that would get some input from the user via the virtual keyboard.

              Thanks Fuzzbender I think posting this event might be the right way to go.

              Me, Grimlock, not "nice dino". ME BASH BRAINS!

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kkrzewniak
                wrote on last edited by
                #7

                I now have the virtual keyboard displaying(I have a QLineEdit subclass in a QGraphicsProxyWidget) and it works nicely. But however I need to react to the virtual keyboard being closed and I cant seem to get the QEvent::CloseSoftwareInputPanel event. I even installed an application wide event filter.

                Me, Grimlock, not "nice dino". ME BASH BRAINS!

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kkrzewniak
                  wrote on last edited by
                  #8

                  I got this one working, but it took one of the dirties hacks I had to ever use with Qt(and I'm not pleased with it because it might lead to some bugs). Basically what I've done is I have reimplemented the mousePressEvent mouseReleaseEvent and paintEvent with the following.
                  @void MyClass::mousePressEvent(QMouseEvent *event)
                  {
                  QLineEdit::mousePressEvent(event);
                  //setup some variables I need for painting
                  }
                  @

                  @void MyClass::mouseReleaseEvent(QMouseEvent *event)
                  {
                  //Hack Forcing the Virtual keyboard
                  QLineEdit::mouseReleaseEvent(event);
                  QLineEdit::mousePressEvent(event);
                  QLineEdit::mouseReleaseEvent(event);
                  //----------------------------------------------------------------------------------------------
                  isEditing = true;
                  //setup some variables I need for painting
                  }@

                  @void MyClass::paintEvent(QPaintEvent *)
                  {
                  //painting
                  //if Editing the update will be called after the input is hidden
                  if(isEditing)
                  timer->start();//A single shot timer triggering what I need to do
                  }
                  @

                  As I have stated I'm not pleased with this. I had to make an assumption that a paintEvent will be called only after the virtual gets hidden (this happens to be the case on my Nokia 5800 and hopefully it won't blow up in my face on other devices). The application gets locked in portrait mode so fortunately rotations aren't a concern. But please If anyone knows of a better way of learning that the virtual keyboard has been hidden please let me know. I think that me not getting the CloseSoftwareInputPanel event might have something to do with the fact that I'm working with a widget embedded in QGraphicsView.

                  "QTBUG-8866":http://bugreports.qt.nokia.com/browse/QTBUG-8866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

                  Me, Grimlock, not "nice dino". ME BASH BRAINS!

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    infotorpk
                    wrote on last edited by
                    #9

                    hi,
                    if i am using it for embedded,how can i brings up the virtual keyboard?

                    FYI:
                    I am running ubuntu on my embedded device.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kumararajas
                      wrote on last edited by
                      #10

                      [quote author="infotorpk" date="1415955181"]hi,
                      if i am using it for embedded,how can i brings up the virtual keyboard?

                      FYI:
                      I am running ubuntu on my embedded device.[/quote]

                      Build the virtual keyboard by yourself (Or plenty of ready made solutions in internet, download and customize as per your embedded device display size)

                      On line edit clicked, show your virtual keyboard. On "Done", hide the keyboard.

                      --Kumar

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kumararajas
                        wrote on last edited by
                        #11

                        [quote author="infotorpk" date="1415955181"]hi,
                        if i am using it for embedded,how can i brings up the virtual keyboard?

                        FYI:
                        I am running ubuntu on my embedded device.[/quote]

                        Build the virtual keyboard by yourself (Or plenty of ready made solutions in internet, download and customize as per your embedded device display size)

                        On line edit clicked, show your virtual keyboard. On "Done", hide the keyboard.

                        --Kumar

                        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