Results 1 to 8 of 8

Thread: is it possible to obtain the svg data from QgraphicsSvgItem?

  1. #1
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default is it possible to obtain the svg data from QgraphicsSvgItem?

    hi,

    I have created QGraphicsSVgObject using svg file name.
    Once the object is created we no longer required physical file.

    But is there any way to get this svg data from the available QGraphicsSvgItem?

    Thanks in advance.

    Regards,
    ~Sanjay

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: is it possible to obtain the svg data from QgraphicsSvgItem?

    Quote Originally Posted by sanjayshelke View Post
    But is there any way to get this svg data from the available QGraphicsSvgItem?
    No there is no such interface provided.

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: is it possible to obtain the svg data from QgraphicsSvgItem?

    What information do you need from the object?
    You can access the it through:
    QGraphicsSVgObject::renderer()
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  4. #4
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: is it possible to obtain the svg data from QgraphicsSvgItem?

    i need svg file contents from which the svg object was created.

    I was thinking that either QGraphicsSVgItem or QSvgRenderer might have some interface which gives us svg file data.

    But i could not find anything.

  5. #5
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: is it possible to obtain the svg data from QgraphicsSvgItem?

    You can load it with QFile in to a QString, and use that.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  6. #6
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: is it possible to obtain the svg data from QgraphicsSvgItem?

    Quote Originally Posted by high_flyer View Post
    You can load it with QFile in to a QString, and use that.
    He want to access it trough QGraphicsSvgItem instead directly.

    Quote Originally Posted by sanjayshelke View Post
    But is there any way to get this svg data from the available QGraphicsSvgItem?

  7. #7
    Join Date
    Jul 2007
    Posts
    90
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: is it possible to obtain the svg data from QgraphicsSvgItem?

    ok. Thanks a lot for your replies.

    But there is no way to obtain the actual xml data from QGraphicsSVgItem or QSVGRenderer.

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

    Default Re: is it possible to obtain the svg data from QgraphicsSvgItem?

    I need the same thing, access the svg data trough QGraphicsSvgItem instead directly.

Similar Threads

  1. data rate transfer is decreasing in TCP connection
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2009, 16:15
  2. Best way to display lots of data fast
    By New2QT in forum Newbie
    Replies: 4
    Last Post: 16th October 2008, 22:46
  3. Replies: 7
    Last Post: 29th August 2008, 10:24
  4. Replies: 4
    Last Post: 19th October 2007, 19:47
  5. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53

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.