Hi
I am using Qt 4.8.7 Static on Windows Platform. I want to show preview DOCX,PPTX and XLSX file preview.
Is there any way to show preview...I am using following code
///for Powerpoint
m_pAxDocument->setGeometry(m_pTextEdit->geometry());
m_pAxDocument->setProperty("DisplayAlerts",false);
QAxObject *axObject
= m_pAxDocument
->querySubObject
("Presentations");
QAxObject *present
= axObject
->querySubObject
("Open(const QVariant&)",
QVariant(strFileName
));
///for Powerpoint
QAxWidget *m_pAxDocument = new QAxWidget("PowerPoint.Application",m_pTextEdit);
m_pAxDocument->setGeometry(m_pTextEdit->geometry());
m_pAxDocument->setProperty("DisplayAlerts",false);
QAxObject *axObject = m_pAxDocument->querySubObject("Presentations");
QAxObject *present = axObject->querySubObject("Open(const QVariant&)",QVariant(strFileName));
To copy to clipboard, switch view to plain text mode
for DOCX
m_pAxDocument
= new QAxWidget("Word.Document",m_pTextEdit
);
m_pAxDocument->setGeometry(m_pTextEdit->geometry());
m_pAxDocument->setProperty("DisplayAlerts",false);
m_pAxDocument->setControl(strFileName))
m_pAxDocument = new QAxWidget("Word.Document",m_pTextEdit);
m_pAxDocument->setGeometry(m_pTextEdit->geometry());
m_pAxDocument->setProperty("DisplayAlerts",false);
m_pAxDocument->setControl(strFileName))
To copy to clipboard, switch view to plain text mode
It show preview but it is editable, it directly open in MS Word or powerpoint and you can do anything with its preview...cut, copy paste.
I want it to make preview using QAxWidget readable only...Is there any method for this...I am also unable to disable the QAxWidget/QTextEdit.. I don't have control on this preview...
Or any other way to show DOCX,PPTX and XLSX file preview in Qt.
Kindly reply..
Thanks
Santosh
Bookmarks