Qt has its own wrapper on WebKit (QWebNode, QWebElement, etc).
How can I create HTML element using that Qt wrapper (obtain QWebElement of new HTML element)?
If it can help, say we have QWebFrame frame
.
Qt's text widgets are able to display rich text, specified using a subset of HTML 4 markup.
To create Qt-based web applications, Qt provides interfaces that support a wide range of standard web techologies such as HTML, CSS, and JavaScript. These interfaces enable applications to embed content from the World Wide Web.
If you want to provide your users with an editable rich text editor, use QTextEdit. If you want a text browser without hypertext navigation use QTextEdit, and use QTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text use QLabel.
The only method I found is to call appendInside
, appendOutside
, etc methods of existing QWebElement
elements with QString
html markup as an argument.
QWebElement existingElement;
existingElement.appendInside( '<div/>' );
QWebElement newElement = existingElement.lastChild();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With