Results 1 to 3 of 3

Thread: Accessing elements of a svg file

  1. #1
    Join Date
    Feb 2010
    Location
    Cuba
    Posts
    35
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Accessing elements of a svg file

    There is any way of knowing all the elements of a svg file? What I need is given a svg file, know all the elements that it has (its identifiers), with the same hierarchical structure as these are, of course using any of the classes in the module QtSvg. Most importantly, edit these identifiers. Known once the structure, I want to form the tree of of the hierarchy.
    Sorry my English and any help is welcome.
    Thanks in advanced.
    Last edited by Hogwarts; 21st February 2011 at 15:35.

  2. #2
    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: Accessing elements of a svg file

    An SVG file is just plain XML. There are XML manipulating tools in the QtXml module. Either treat the SVG file as a whole using the QDomDocument or read it in a stream-like fashion using QXmlSimpleReader or QXmlReader

  3. #3
    Join Date
    Feb 2010
    Location
    Cuba
    Posts
    35
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Accessing elements of a svg file

    I already had found that solution, but I can't use any class of QtXml module. What I need is given a QGraphicsSvgItem object, access to all properties of this object, likewise, access the properties of the childs elements that are inside it.

Similar Threads

  1. Multiple File Data accessing
    By hasnatzaidi in forum Newbie
    Replies: 1
    Last Post: 28th October 2009, 16:34
  2. accessing table elements in Qt
    By awanish_jmi in forum Newbie
    Replies: 5
    Last Post: 28th July 2008, 12:51
  3. accessing gui elements from parent
    By chemstar in forum Qt Programming
    Replies: 3
    Last Post: 21st May 2006, 11:22
  4. Accessing DTD in an XML file via QtXml module?
    By jorma in forum Qt Programming
    Replies: 1
    Last Post: 6th May 2006, 18:09
  5. Accessing the entire file..
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 28th April 2006, 07:41

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.