XML Output: in QML??
-
Hello,
I gone through some examples in Qt Widgets as well as in Qt Quick. In case of Qt Widgets when we shift from Design mode to Edit mode it shows us XML file. But If I use Qt Quick is it possible to produce XML file as an output ?
Many Thanks
-
Hi no.
The QML is all it needs.
For Widgets it needs the XML also.
So it will not create XML from QML. -
@ShrikantAmbade
No, I do not think Qt can do that. -
@ShrikantAmbade
But why you want QML as XML?
Cant you just use QML ?
its also text file and structured.QML is perfect for touch.
QT Widgets does support touch but its not as easy to swipe and such gestures.
(with widgets)QML/ quick is much more fluent in this.
-
@ShrikantAmbade
But XML is just for layout in Designer.
What will "other framework " need that for ?
Would it not be possible to have interface in QML and just generate (with own code) the
XML needed for "other framework " . ?It all depends of what the application is. If normal desktop type application , Widgets will be great.
But if Modern looking phone like interface is the target, then QML will get there faster. -
@ShrikantAmbade said:
Ok so your program is like a text editor, but instead of text it loads
security specifications and can then change them and then
send it as XML to WorSE?Or you mean like Designer, where you can place widgets on a screen and it must then send the
layout of that screen as xml to Worse? -
@ShrikantAmbade
Ok. such editor.
Have a look at
http://doc.qt.io/qt-5/qtwidgets-graphicsview-diagramscene-example.htmlCould provide a good starting point.
-
@ShrikantAmbade
Super :)
You should really start with some basic first to get to know it a bit.
http://doc.qt.io/qt-4.8/how-to-learn-qt.htmlWell just post to forum. Im online often and many other are too so best with forums
so all can answer. -
Whatever I code, I want to export this code into XML
Can you give example ?
as export code to xml could be many things. -
@ShrikantAmbade
ok not sure how it relates to
security specifications in graphical way. -
@mrjj The following is an example of HRU model specification
Q = 2Sx 2Ox Mis the state space where
Sis a (not necessarily finite) set of subjects,
Ois a (not necessarily finite) set of objects,
M = {m|m:2Sx 2O→2R } is a set of ACMs with a finite right set R,
Σ = Ax Xis a finite set of inputs where
Ais a set of operations/actions,
X= (SO)kis a k-dimensional vector of subjects and objects, the parameters of the actions,
:QxΣ→Qis a state transition function,
q0Qis the initial state.
some mathematical symbols are not proper here plz ignore itthis is just a textual notation I will represent it but in Graphical way and code accordingly and once it is done must export into XML