01-02-2014 09:57 AM - edited 01-02-2014 09:59 AM
There are a few discussions on the board but no true examples.
I've tried the following code:
01-02-2014 10:48 AM
Hello, and welcome to the forums.
It appears you may not understand what a signal is and how it works. I strongly suggest you read and understand this before trying to proceed with your coding.
01-02-2014 12:57 PM
Thanks for the course correction... If I had actually absorbed what I was reading in the refrence I would have noticed it was a signal...
Still trying to figure out to work with the const QVariant &result, more reading to do...
01-02-2014 01:21 PM
I am getting ready to go out of town for two days so I don't have time to test this myself, but while getElementById() is unique and returns a single element, getElementsByTagName() returns an array of elements, even if there is just one matching element, since TagName is NOT unique.
First off you need to specify which index to use in the array. If there could be more than one you can loop through them with a for loop.
Secondly, what both those functions return are DOM elements, not simple strings that can be printed. If you want to print then you have to decide what you want to print... OuterText, InnerText, an attribute, etc. I think you need to read up on DOM as well as QML.