[Qt-interest] how to insert last input as first table record in QwebKit
Meir Yanovich
meiry242 at gmail.com
Tue May 4 10:58:36 CEST 2010
Hello all
im using Qwebkit and i like to be able to insert into html table each data
input that comes last
as first record ( <tr><td>...my data ...</td></tr>) in to the table .
here is my code this is only example ::
ui.webView->page()->mainFrame()->setHtml("<html><body><p>HTML Table
Test</p>"
"<table id=\"mainTable\"
name=\"mainTable\" BORDER=1 BORDERCOLOR=RED></table>"
"</body></html>");
QWebElement body = ui.webView->page()->mainFrame()->documentElement();
QWebElement mainTable =
ui.webView->page()->mainFrame()->findFirstElement("#mainTable");
mainTable.appendInside ("<tr><td>1111111<\/td></\tr>"); ///<-- this
is i like to be last in the end
mainTable.appendInside ("<tr><td>2222222<\/td></\tr>"); ///<-- this
is i like to be in the middle
mainTable.appendInside ("<tr><td>3333333<\/td></\tr>"); ///<-- this
is i like to be in the first
how should i do that ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100504/5ec8be87/attachment.html
More information about the Qt-interest-old
mailing list