tags:

views:

65

answers:

3

Say I have created a GUI (Qt) that operates with some data(text+image). How I can export that data in one of listed formates in title.

I guess it is better to export info .rtf as it is free cross-platform formt(??), isn't it?

A: 

Depends on what you're trying to do, but maybe HTML + separate image file would be good enough?

If you want to export a file that is easy to view/print etc., but you don't really need to import it back into your application, you could make a PDF.

Artelius
I want to export into one of listed formats above. Not in HTML!
Narek
I don't think `rtf` supports embedded images. `txt` certainly doesn't. Any particular reason you are limited to those formats?
Artelius
In rtf you can have images. But, OK, PDF sounds good. Only one big disadvatage, you can not edit pdf if you do not have adobe acrobat professional, which costs money. But rtf is free. Any wayhow can I do that?
Narek
http://stackoverflow.com/questions/58730/open-source-pdf-library-for-c-c-application
Artelius
A: 

Do you mean you want to have something that looks like a snapshot of your gui?

In other case you could see it like the document export is just another way to view your data. One way is building your GUI, another way is to build some sort of document and write to a file.

Depending on how much you've mixed your data with the presentation, this could be hard or (comparatively) easy.

I don't know of any way to automatically do this for a QT gui, and I doubt you'll find a tool that does what you want.

Mattias Nilsson
Not like a snapshot! I want to export some data that could be in future edited. Like, say, my GUI generates some data and I want to export it to edit, print, edit a bit more, print once agin :).
Narek
+1  A: 

See question about RTF reading and writing.

Roku
I have seen this question befor asking! Except librtf hopped find something new. Also it is not intuitive how to use librtf. Is there any simple example?
Narek
Oh, I have found a link that can help me and users that will read this answer :). Here it is: http://www.codeproject.com/KB/library/rtflib.aspx
Narek