On Thu, 2011-12-01 at 13:51 +0200, Diego Iastrubni wrote:
> On Thu, Dec 1, 2011 at 6:01 AM, BerenScott <berensc...@iinet.net.au> > wrote: > Hello,
> I am trying to place a call to keyPressEvent which basically > hits the > enter key. Could someone please tell me how to structure that > call?
> Something like:
> keyPressEvent(blah blah blah);
> What do I put in blah blah blah?
> This is a callback method, you need to overload it, not call it > directly.
> What are you trying to do? emulate a keypress?
This is what will happen, I need to open up 5 new tabs, and then automate the actions in each tab most of which will never be seen. So, to do this, I want to put some code into the webview.cpp, so that when a certain condition is met, on load, it will basically hit the enter key.
keyPressEvent exists within the webview.cpp, but I don't really know how to call it. If I have to overload it, how exactly do I do that?
On Thu, Dec 1, 2011 at 2:05 PM, Beren Scott <berensc...@iinet.net.au> wrote: > On Thu, 2011-12-01 at 13:51 +0200, Diego Iastrubni wrote:
> > On Thu, Dec 1, 2011 at 6:01 AM, BerenScott <berensc...@iinet.net.au> > > wrote: > > Hello,
> > I am trying to place a call to keyPressEvent which basically > > hits the > > enter key. Could someone please tell me how to structure that > > call?
> > Something like:
> > keyPressEvent(blah blah blah);
> > What do I put in blah blah blah?
> > This is a callback method, you need to overload it, not call it > > directly.
> > What are you trying to do? emulate a keypress?
> This is what will happen, I need to open up 5 new tabs, and then > automate the actions in each tab most of which will never be seen. So, > to do this, I want to put some code into the webview.cpp, so that when a > certain condition is met, on load, it will basically hit the enter key.
> keyPressEvent exists within the webview.cpp, but I don't really know how > to call it. If I have to overload it, how exactly do I do that?
> keyPressEvent << Qt::Key_Enter;
> or something like that?
If you want to automate a GUI - there are better solutions (see http://www.froglogic.com/) If you want to submit several forms - again, better place.
On Thu, 2011-12-01 at 15:07 +0200, Diego Iastrubni wrote: > On Thu, Dec 1, 2011 at 2:05 PM, Beren Scott <berensc...@iinet.net.au> > wrote: > On Thu, 2011-12-01 at 13:51 +0200, Diego Iastrubni wrote:
> > On Thu, Dec 1, 2011 at 6:01 AM, BerenScott > <berensc...@iinet.net.au> > > wrote: > > Hello,
> > I am trying to place a call to keyPressEvent which > basically > > hits the > > enter key. Could someone please tell me how to > structure that > > call?
> > Something like:
> > keyPressEvent(blah blah blah);
> > What do I put in blah blah blah?
> > This is a callback method, you need to overload it, not call > it > > directly.
> > What are you trying to do? emulate a keypress?
> This is what will happen, I need to open up 5 new tabs, and > then > automate the actions in each tab most of which will never be > seen. So, > to do this, I want to put some code into the webview.cpp, so > that when a > certain condition is met, on load, it will basically hit the > enter key.
> keyPressEvent exists within the webview.cpp, but I don't > really know how > to call it. If I have to overload it, how exactly do I do > that?
> keyPressEvent << Qt::Key_Enter;
> or something like that?
> If you want to automate a GUI - there are better solutions > (see http://www.froglogic.com/) > If you want to submit several forms - again, better place.
Unfortunately, I wish to do it in the method I have specified. I wish to send the enter key to multiple tabs using the keyPressEvent in webview.cpp. Could you please just specify how I can go about doing that? I'm fairly new at all of this. I have done a lot of work on this, but just need to do that above mentioned action.
> Unfortunately, I wish to do it in the method I have specified. I wish to > send the enter key to multiple tabs using the keyPressEvent in > webview.cpp. Could you please just specify how I can go about doing > that? I'm fairly new at all of this. I have done a lot of work on this, > but just need to do that above mentioned action.
Please read the last link in the previous email (quoted here).