Insert text into the textbox in qwebview through virtual keyboard - qt

I am developing a virtual keyboard in qt. I want to display it in QWebView when user taps on a text field in web page. I am able to pop up the kayboard on user click. But not able to put the text into the text field entered through virtual keyboard. Any help would be appreciated.
Thanks in advance

What is the problem you have, which approaches did you try?
A simple way would be to inject a fake QKeyEvent into Qt's eventing system, using QCoreApplication::postEvent()

Related

Interface to allow the user to type/input text in a-frame (headset)

I'm working on an a-frame project that would require the user to write a line of text in an input field.
Of course in the browser, this is possible to achieve with the keyboard, but I don't know how I would go about doing this if the user views the a-frame virtual reality with a headset.
Any suggestions?
Check out the AFrame GUI Component
There is a keyboard mapped for gaze/fuze input
You can also try the <a-keyboard> primitive that's part of the aframe-material collection:
https://github.com/etiennepinchon/aframe-material#-a-keyboard-%EF%B8%8F

Qt creator - make a dynamic interface

I am working on a small UI with QT Creator and its drag-n'-drop tool (QT Designer). Everything was fine till I realized I had to make some widgets dynamic. For example, I have a checkbox and I want some button to appear only if this checkbox is checked by the user or I would like to change the appearance of another widget when the user clicks on some button.
Is it possible to do it only with QT Designer?
Yes, but it's very limited.
Qt designer have signal&slot editor. Yes, you can connect signal clicked(bool) to setVisible(bool) slot on button and make button visible only when checkbox is checked (see screenshot).
But when You need more complex dynamic interface (e.g. creating buttons), designed will not help You.

Facebook Log In with virtual QWERTY in FLEX

I am working in a project which uses the Facebook graph-api to log in. I have the requirement of only using a virtual keyboard (no hardware will be present). I have looked everywhere, but can't find a solution for adding a virtual qwerty keyboard to the popUp.
I can put the keyboard into a popup, or I could add the qwerty keyboard into the screen with the addChild() method, but I still have one problem: the virtual keyboard does not focus to the textInputs of the popup and when i press a key, everything "explooota".
Anyone knows how i could solve the focus problem?
I mean... when i prees the virtual key, i call a java function wich simulate a physical keyboard, but i lose the focus into the facebook input text and the letter is not in the textinput... and i dont know how to recover the focus...
Thanks in advance for the help!
We had the same problem with a desktop app written in C#. I can only answer for a windows based application. Assuming you are working on a desktop app and that you are showing the login in a web browser control you can use the SendInput API to direct keyboard-like input to a field in the browser. We had our own custom keyboard; I don't think you will be able to use the built-in on-screen keyboard MS provides.
We had a windows form that hosted a web browser control and the keyboard custom control. The user touches the field that they want to fill in. The user types their input using the on-screen keyboard, the keyboard uses SendInput to send the appropriate character for the key that was touched to the web browser control. Other problems to look out for:
the facebook login form takes a lot of space, having both the keyboard and login visible at the same time is difficult
sending non-ascii characters; see this for help (SendInput sequence to create unicode character fails)
the user will have to touch to select the input field
there are other links on the FB login page you may want to restrict (like create an account)
an on-screen keyboard where touching the key doesn't steal focus from the browser field
These can all be solved but they are not trivial.

Changing Textbox and other UI components in Qt/Webkit?

I am making my own browser with Qt/Webkit for touch screen devices. I want to have My own editbox in browser ( so that when user click on it, I can open virtual keyboard), Touch friendly listbox and other controls.
So In QWebView I want to have MyOwnTextEdit instread of QTextEdit and same for all other UI controls.
Please tell me How can I do it?
I am using Qt embedded linux 4.6.2.
For example, you can see how this kind of things realized in more easy widgets here: link text. It's the first way. The second way is to create you textbox with SIGNALs/SLOTs and also code widgets GUI with Qt styles. Good luck!

Virtual keyboard for QtWebKit based browser or how can I get the currently focused text field?

I'm working on implementing a virtual keyboard for a QtWebKit based browser. I'm having a lot of difficulty understanding how QtWebKit paints the controls within the actual page. Initially I thought they were QLineEdit instances, but they are not. Diving into implementation it appears that the glue code between Qt and WebKit paints the text field using QStyle and QPainter. Unfortunately, I'm very new to Qt and so I dont understand where in the event loop the mouse presses for these events are interpreted. I found Editor::canEdit() deep in the call stack, and now I can bring up the virtual keyboard when the user clicks on a text field within the page. The virtual keyboard then expected a pointer to a QWidget instance, but Edito::canEdit() doesn't carry that information and I can't find anywhere where a QWidget like instance is exposed. I'm really stumped, any advice would be most welcome.
Thanks!
You might get better luck by hooking the virtual keyboard into the Qt input method system. Search for "InputMethod" in the source code of QtWebKit Api, i.e. the qweb*.* files.

Resources