Results 1 to 5 of 5

Thread: Loving Qt and Qt4 Designer but hit a wall with SVG

  1. #1
    Join Date
    Aug 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Loving Qt and Qt4 Designer but hit a wall with SVG

    I'm programming using PyQt and Qt4 Designer and enjoying the great productivity they provide.

    I have a working application and need quite a sophisticated interface to it. Qt Designer has been fantastic and I have a great UI that looks to do almost everything I need.

    The application includes the presentation of information on SVG maps. I lifted svg_view from the svgviewer example and it provided a great widget allowing me to zoom and pan the map exactly the way I wanted.

    However QtSvg currently allows no SVG DOM manipulation - I need to be able to change the loaded map and respond to mouse events in the context of the svg elements (e.g. colour a moused territory (shape), highlight a route...) - the sort of thing I could do easily with jquerysvg on a webpage (where the complexities of the rest of the GUI requirement left me floundering)

    Is there any possibility of an interactive SVG widget where the DOM could be manipulated in response to events triggered from the SVG elements?

    It seems harsh to have such a tantalising capability to display the SVG while being unable to take advantage of SVG's real power in terms of its interaction potential.

    Does anyone know if/where/how I can get hold of an interactive SVG widget for Qt?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Loving Qt and Qt4 Designer but hit a wall with SVG

    QtWebKit has a more complete SVG support, you should be able to use it. Your jquerysvg should work with it too.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Loving Qt and Qt4 Designer but hit a wall with SVG

    Thanks wysota,

    I will look into QtWebkit further. I'm not sure how I can tie the javascript in the webkit displayed page with the rest of the application/interface.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Loving Qt and Qt4 Designer but hit a wall with SVG

    You can use WebKit for SVG rendering and manipulation and handle the rest in the usual way.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Loving Qt and Qt4 Designer but hit a wall with SVG

    Why are the facilities of the QtXml module insufficient to manipulate your SVG document? SVG is just an application of XML and you have DOM and SAX access paths, in QtXML, along the XSLT, XPath, XQuery, and schema validation in QtXmlPatterns.

Similar Threads

  1. Qt Assistant Assistant 4.7.0 refresh drives me up the wall!
    By koan in forum Qt Tools
    Replies: 0
    Last Post: 18th November 2010, 23:18
  2. Replies: 1
    Last Post: 8th September 2010, 20:31
  3. Replies: 2
    Last Post: 1st October 2009, 17:26
  4. Qt4.4 widget wall.
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2008, 11:49
  5. Replies: 1
    Last Post: 22nd January 2007, 13:13

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.