Qt Reference Documentation

statisticsInHTML.xq Example File

     <p>In total the tree has {count($root//QObject)} QObject instances.</p>
     <p>Order by occurrence, the QObjects are:</p>

       for $i in $root/preceding-sibling::metaObjects/metaObject
       let $count := count($root//QObject[@className eq $i/@className])
       stable order by $count descending
       return if($count > 1)
              then <li>{string($i/@className), $count} occurrences</li>
              else ()

       (: For each QObject, we create a table listing
        : the properties of that object. :)
       for $object in $root//QObject
         return (<h2>{let $name := string($object/@objectName)
                      return if(string-length($name))
                             then $name
                             else "[no name]",
                      '(', string($object/@className), ')'}</h2>,
                 <table border="1">
                       <td>Property Name</td>
                                    then string(.)
                                    else "N/A"

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();