I was looking at the Text Editor Example, which is using a QML control which uses QTextDocument through a C++ back end, which I like, but it destroys my HTML code, for example it will turn my div’s into p, and removes all its id’s, class’s and style’s, maybe there is a setting to preserve HTML code that I do not know about, I use toHtml to save it to file, it also destroys my XML, for example all my files look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<messages>
<message id="my-template">
<div >
Some Widget Templates, which actual get saved fine already
${widget:video id='video1' class='wtvideo'}
<div >
Lots of text, with html 5 tags, which do not work with QTextDocument
</div>
</div>
</message>
</messages>
I have searched all week for an example of latest Quick Controls using the QtWebKit to edit and save XHTML files with all there code intact, even some hint at if it can be done, if its ever been done, only statements saying it can be done, I am referring to the documents, because that is all I found, no examples, and it also left me thinking there might be problems on some platforms, since I want this to run on all platforms.
I could spend another week trying to write the program, but I thought, just maybe someone else did, and has a sample or example of it, it would keep me from reinventing the wheel, because at this time, even a clue would help, because as far as I can tell there is no example of it on their site as an XHTML editor that is, and have this very serious deficiency in QTextDocument only handling HTML 4, and I do not know how to keep it from trashing my XHTML, so any help would be great.
BTW: This app is called Qut Wizard, its part of the WittyWizard.org [wittywizard.org] Open Source Project that uses Wt for the Web Application and a Qt version of the Wizard called Qut Wizard, the idea is using a Qt Quick QML app to edit the web site, which is stored in XML documents like the one above, which can be uploaded later using ssh or ftp, which is more secure then a web based back end, it also has to edit XML files and save them to xml files, which is another example I have not found, and I was not able to figure out how to save using XmlListModel, I know I will have to write a C++ back end to save the data, but wish I could find examples of this also, because its like reinventing the wheel, it just seems to me that there should be some good examples of HTML, XML and XHTML Editors, since this is a very common need.
Thanks
Jeff Flesher
↧