Hello Hannes,

have you tried triggering the submit button?

But consider that a website could override the events - and it is also
generally not considered good style to control an object by simulating
user input (it is very fragile and could also be disrupted by actual
user inputs).

I would rather incorporate the HTTP communication directly.
For example navigate to
"https://www.google.com/search?q="; +
QUrl::toPercentEncoding(YOUR_SEARCH_TERM)
or if the fields are transmitted via HTTP POST, see
https://codereview.qt-project.org/#/c/167422/

Regards

Viktor


Am 25.08.2016 um 08:59 schrieb Johannes Pointner:
> Hello all,
>
> I'm trying to use a QKeyEvent to trigger the same action as if I hit
> the enter/return key on my keyboard on an input field in a webpage
> (like starting a search in google or login to something).
> But I can't get it to work. All other keys I tried like backspace or
> characters work.
> I also tried to accomplish this with the new QtVirtualKeyboard but
> there the enter/return key also didn't work.
>
> Isn't this possible for the QtWebEngine?
>
> I'm using Qt5.7 and Arch Linux (x86_64)
>
> Thx in advance,
> Hannes
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-- 


Viktor Engelmann
Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
viktor.engelm...@qt.io
+49 151 26784521
http://qt.io

Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
<http://qt.io>
<http://www.facebook.com/Qt>    <http://www.twitter.com/qtproject>
<https://www.linkedin.com/company/the-qt-company/>
<https://plus.google.com/104580575722059274792>
<https://www.youtube.com/QtStudios>

Qt World Summit 2016 <http://qtworldsummit.com/>
Qt World Summit 2016 | Pier 27, San Francisco, CA
Experience Exponential Potential on October 18-20
www.qtworldsummit.com <http://www.qtworldsummit.com>

<<attachment: viktor_engelmann.vcf>>

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to