Results 1 to 6 of 6

Thread: DOCX,PPTX and XLSX file preview in Qt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default DOCX,PPTX and XLSX file preview in Qt

    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

    Qt Code:
    1. ///for Powerpoint
    2. QAxWidget *m_pAxDocument = new QAxWidget("PowerPoint.Application",m_pTextEdit);
    3. m_pAxDocument->setGeometry(m_pTextEdit->geometry());
    4. m_pAxDocument->setProperty("DisplayAlerts",false);
    5.  
    6. QAxObject *axObject = m_pAxDocument->querySubObject("Presentations");
    7. QAxObject *present = axObject->querySubObject("Open(const QVariant&)",QVariant(strFileName));
    To copy to clipboard, switch view to plain text mode 

    for DOCX
    Qt Code:
    1. m_pAxDocument = new QAxWidget("Word.Document",m_pTextEdit);
    2. m_pAxDocument->setGeometry(m_pTextEdit->geometry());
    3. m_pAxDocument->setProperty("DisplayAlerts",false);
    4. 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
    Last edited by anda_skoa; 5th November 2016 at 13:03. Reason: missing [code] tags

Similar Threads

  1. microsoft docx <-> qtextdocument
    By andres in forum Jobs
    Replies: 2
    Last Post: 8th June 2012, 20:43
  2. To preview pdf, doc, rtf file.
    By merry in forum Qt Programming
    Replies: 3
    Last Post: 21st September 2011, 10:53
  3. Replies: 9
    Last Post: 25th June 2009, 14:10
  4. File Open dialog with preview?
    By will49 in forum Qt Programming
    Replies: 2
    Last Post: 24th July 2007, 18:08
  5. preview file dialog
    By mickey in forum Qt Programming
    Replies: 11
    Last Post: 21st April 2006, 23:03

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.