Results 1 to 4 of 4

Thread: "Simple DOM Model Example"

  1. #1
    Join Date
    Jun 2007
    Location
    italy
    Posts
    126
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    15
    Thanked 1 Time in 1 Post

    Question "Simple DOM Model Example"

    I would like to know if it is possible to write to a text file a QTreeView such as in the "Simple DOM Model Example"

    Some example?

    Thx

    Roby

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: "Simple DOM Model Example"

    You can get simple tree view with indentation by using QDomNode::save

  3. #3
    Join Date
    Jun 2007
    Location
    italy
    Posts
    126
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    15
    Thanked 1 Time in 1 Post

    Default Re: "Simple DOM Model Example"

    thanks

    is it easy possibile to save as "bold" all the element vith a text value ?
    What about save to a pdf file ?

    thx

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: "Simple DOM Model Example"

    Not sure.. but this comes to my mind -
    Render the tree in QTextDocument with syntax highlighting.
    Now render the document to printer using QTextDocument::drawContents with QPrinter::PdfFormat output format set on the QPrinter .
    Hope it works

Similar Threads

  1. hierarchical model in a flat view
    By gniking in forum Qt Programming
    Replies: 4
    Last Post: 10th November 2009, 21:17
  2. Replies: 1
    Last Post: 3rd June 2009, 20:08
  3. Custom Model Advice Requested
    By mclark in forum Qt Programming
    Replies: 3
    Last Post: 18th September 2008, 17:26
  4. Adapting the "Simple DOM Model Example" to be read/write
    By joshuajcarson in forum Qt Programming
    Replies: 7
    Last Post: 8th September 2008, 21:19
  5. Model Choices review/questions
    By ucntcme in forum Qt Programming
    Replies: 1
    Last Post: 16th September 2007, 22:57

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
  •  
Qt is a trademark of The Qt Company.