PDA

View Full Version : read the file which has the format of odp!



sunnysun520
13th May 2009, 14:08
hello everybody! if i want to open file with the odp format using qt4.5? what can i do ?
where has the example for it ? ls someone has the experience about it?
thank you! wait for your relay!

sunnysun520
13th May 2009, 14:44
please help me .....

wysota
13th May 2009, 14:55
Qt can't read Open Document files. You can use QDesktopServices::openUrl() to open it with a default application handling that file type in your system (which is OpenOffice or KOffice probably).

sunnysun520
13th May 2009, 15:11
Thanks! but I find source code of reading odt file.

sunnysun520
14th May 2009, 03:08
nobody koow?

wysota
14th May 2009, 09:01
I already told you - Qt doesn't handle Open Document files.

Lykurg
14th May 2009, 10:25
I already told you - Qt doesn't handle Open Document files.
..but feel free to unzip the file, load the inherited content.xml, use Qt's XML capabilities to modify it, save it, pack the odp again et voilà !

sunnysun520
14th May 2009, 13:57
I already told you - Qt doesn't handle Open Document files.

but I already find the source code to open the ODT file and display it! it is certified that
Qt can handle it. Isn't it?
if you want to see the source,I can send it to you! thanks!

talk2amulya
14th May 2009, 14:10
feel free to share any source code..we are all source code hungry people ;)

wysota
14th May 2009, 14:16
but I already find the source code to open the ODT file and display it! it is certified that
Qt can handle it. Isn't it?

ODP is not ODT. The latter is text, the former is mostly graphics. Unless you write your own parser for the xml that makes the ODP and creates a graphics scene from it, you won't make any progress. With ODT this is much simpler because Qt has native support for text documents but still the ODT converter you found probably converts only a small subset of ODT to QTextDocument.

sunnysun520
14th May 2009, 14:28
ODP is not ODT. The latter is text, the former is mostly graphics. Unless you write your own parser for the xml that makes the ODP and creates a graphics scene from it, you won't make any progress. With ODT this is much simpler because Qt has native support for text documents but still the ODT converter you found probably converts only a small subset of ODT to QTextDocument.

Ah, that accounts for it! thank you very much!

lni
14th May 2009, 15:14
hello everybody! if i want to open file with the odp format using qt4.5? what can i do ?
where has the example for it ? ls someone has the experience about it?
thank you! wait for your relay!

You have been trying to read various office files, are you developing QtOffice? :) There is already an OpenOffice :rolleyes: