Results 1 to 4 of 4

Thread: How to embed WordViewer in qwidget

  1. #1
    Join Date
    Sep 2014
    Posts
    94
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default How to embed WordViewer in qwidget

    Hi Friends,

    i want embed wordviewer in my widget plz sent some code to embed word viewer in qwidget...

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to embed WordViewer in qwidget

    Anything else you want us to do while we're writing your project for you? What have you done to research the problem? What have you tried besides making a post here and telling us to give you code?
    Last edited by d_stranz; 3rd August 2016 at 20:16.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Sep 2014
    Posts
    94
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to embed WordViewer in qwidget

    Hi,

    This is my code i used it is working in my system with msWord 2016 in windows10...In another systems it is not working..plz Help me to solve

    QString nPath;
    nPath = QFileDialog::getOpenFileName(this,"select DOC files",qApp->applicationDirPath(),"*.doc *.docx");
    m_pAxWidget = new QAxWidget(this);
    ui->gridLayout->addWidget(m_pAxWidget);
    m_pAxWidget->setControl(nPath );

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to embed WordViewer in qwidget

    Read the documentation for QAxBase::setControl(). You are using the 4th method - setting the name of the file. This is probably the least reliable way to do it, because it requires having the ActiveX control installed -and- registered as the server for the .doc / .docx file extensions. This might be true on your development system, but probably isn't the case on the system you are trying to move your code to.

    You don't check the return value from "setControl" (a Boolean), which will be false if the call fails to create the ActiveX object instance.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Embed VNC Viewer
    By NoRulez in forum Qt Programming
    Replies: 4
    Last Post: 15th March 2021, 17:03
  2. Embed Mplayer in QML
    By mastablasta in forum Qt Quick
    Replies: 7
    Last Post: 29th April 2015, 18:18
  3. Is there a way to embed QWidget into a browser?
    By lni in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2014, 23:25
  4. QAxServer. How to embed QWidget into .NET forrm?
    By ivigasin in forum Qt Programming
    Replies: 3
    Last Post: 29th November 2012, 11:42
  5. Replies: 10
    Last Post: 11th June 2012, 10:16

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.