入力フィールドでユーザー入力を取得するにはどうすればよいですか?
QObject::connect( webView, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted()) );
void slotLoadStarted()
{
QWebFrame *frame = webView->page()->currentFrame();
if (frame!=NULL)
{
QWebElementCollection collection = frame->findAllElements("input[name=email]");
foreach (QWebElement element, collection)
{
qDebug() << "element.toOuterXml" << element.toOuterXml();
qDebug() << "element.attribute value:" << element.attribute("value");
}
}
}
属性を設定すると機能しますが、ユーザー入力をキャッチしたいのですが、アイデアはありますか?