如何从QWebView的输入字段中获取值
How to get the Value from a input field in QWebView
在Qt我有一个QWebView
在屏幕上的网站在web视图有一个输入字段,我想从输入字段中获取值属性并将其存储在QString
中基本上,我要问的是如何在QString
从你的QWebView获得QWebFrame(例如ui->webView()->page()->currentFrame()->toHtml();
),然后使用QWebFrame:: findAllElements或QWebFrame::findFirstElement。这将为您提供一个QWebElement,您可以使用attribute方法来获取value属性。
你应该使用evaluateJavaScript("this.value")动态获取属性值:http://www.qtforum.org/article/34091/solved-get-html-dom-dynamic-value-via-qtwebview.html post109395
相关文章:
- 获取具有字段名称的 SELECT 字段类型,并带有 MariaDB C++连接器
- python.clang AST 解析:获取字段声明的 c++ 模板参数
- 获取类中的字段数
- TOS字段从Linux的TCP插座上接收到的数据包获取
- 如何在消息文件中获取用户定义的字段
- 使用 C++ 从 WMI 获取 Windows USB 字幕字段
- 从结构向量中,获取一个向量,该向量收集每个结构的一个字段
- 函数从模板参数中获取字段值,而不是直接访问以允许对相同信息使用不同的名称
- 获取 id 字段作为 QSqlTableModel 中记录的整数
- Qt在主窗口字段中从主窗口获取ui参数
- 快速JSON库获取没有名称字段的值
- 如何在ODBC本机客户端中获取SQL Server DateTime字段
- 如何在 CORBA 中获取和设置类字段?(处理 CORBA 对象的序列)
- 从编辑字段(C++WINAPI)获取值
- 如何从Qt中的字符串中获取特定字段的值
- Lua:加载第二个字符串后无法获取字段;
- 如何使用分隔符获取所有第二个字段的总和
- 遍历所有字段并在 protobuf 消息中获取它们的值
- 如何正确设计从结构中获取不同字段的函子
- 获取 Apache Avro 的通用记录字段的名称?