when I rerun, I am told that QtWebView cannot contain more than one item, so I guess I cannot save a c++ class in QtWebView, going through the doc I found that the c++ classes I needed had already been extended to the quick module. So, I'm going to use the c++ classes in this module instead. Thank you very much for your help.
@Cocojambo said in Custom Data validation for Qt:
@sierdzio Well you have puzzled me a bit :) Never thought about a license type but I think it should be the Apache License 2.0
I have added LICENSE file into the project. Thank you.
Sounds good!
I had to ask because of copyright law, if there is no license, nobody can legally use the code (even if it is available on github).
Forgive me if this doesn't help, but it's what I'm thinking.
I'm not sure if this will even work (unsure if you can swap sources) like this on width changed... but onCompleted should be ok?
It may get you experimenting / thinking differently to get a solution.
http://doc.qt.io/qt-5/qml-qtquick-loader.html#source-prop
Loader {
id: container
anchors.fill: parent
// setSource on Loader Component complete
Component.onCompleted: { doSetSource(); }
}
Connection { target: container; onWidthChanged: { doSetSource(); } }
function doSetSource(){
if(container.width < 320) {
container.setSource("ViewSmall.qml");
...