I didn't get any replies so far, so I kluged it. In the spirit of sharing in case someone else is looking to get this working with minimal effort:

1. Create some public slots on a QObject you intend to add to the javascript object, or add one for only this purpose.
Qt Code:
  1. public slots:
  2. ...
  3. void setPost(const QMap<QString,QVariant>& object);
  4. QMap<QString, QVariant> getPost();
  5. void setGet(const QMap<QString,QVariant>& object);
  6. QMap<QString, QVariant> getGet();
  7. ...
  8.  
  9. private:
  10. QMap<QString, QVariant> _post;
  11. QMap<QString, QVariant> _get;
To copy to clipboard, switch view to plain text mode 

2. Define these functions along these lines:

Qt Code:
  1. ...
  2. void MyQObject::setPost(const QMap<QString,QVariant>& object) {
  3. _post = object;
  4. }
  5. QMap<QString, QVariant> MyQObject::getPost() {
  6. return _post;
  7. }
  8. void MyQObject::setGet(const QMap<QString,QVariant>& object) {
  9. _get = object;
  10. }
  11. QMap<QString, QVariant> MyQObject::getGet() {
  12. return _get;
  13. }
  14. ...
To copy to clipboard, switch view to plain text mode 

3. Created a required js include file:

Qt Code:
  1. /* Code based on that written by Tobias Cohen, tobiascohen.com*/
  2. $.fn.serializeObject = function(){
  3. var object = {};
  4. var sArray = this.serializeArray();
  5. $.each(sArray , function() {
  6. if (object[this.name]) {
  7. if (!object[this.name].push) {
  8. object[this.name] = [object[this.name]];
  9. }
  10. object[this.name].push(this.value || '');
  11. } else {
  12. object[this.name] = this.value || '';
  13. }
  14. });
  15. return object;
  16. };
  17. var POST = MyQObject.getPost();
  18. var GET = MyQObject.getGet();
  19. function MyLibSubmit(form_selector) {
  20. var ob = $(form_selector).serializeObject();
  21. if ($(form_selector).attr('method').toLowerCase() == 'post') {
  22. MyQObject.setPost(ob);
  23. } else {
  24. MyQObject.setGet(ob);
  25. }
  26. return true;
  27. }
To copy to clipboard, switch view to plain text mode 

4. define your form thusly:

Qt Code:
  1. <form id="testForm" method="post" action="index.html" onsubmit="return MyLibSubmit('#testForm')" >
  2. <input type="text" name="val" value="Some value" />
  3. <input type="submit" name="submit" value="Send"/>
  4. </form>
To copy to clipboard, switch view to plain text mode 

You will now have access to JS variables named POST and GET in your JS Scripts.

Cheers