Open a PowerPoint inside QMainWindow



  • hi,
    I'm using setControl(), with the following code, I can open a Word document (.doc or .docx) inside my object QAxWidget ui->slides that have already positioned and centered on my form.

    FullScreen::FullScreen(QWidget *parent) :
    QMainWindow(parent), ui(new Ui::FullScreen)
    {
      ui->setupUi(this);
      if(!ui->slides->setControl("Word.Application"))
        {
          QMessageBox::critical(this, trUtf8("Error DOC"), "Install Microsoft Word(R) for support DOC!");
        }
          ui->slides->setControl("C:\\aaa.docx");
    }
    

    But following the same code for PowerPoint files (.ppt or .pptx), my item QAxWidget ui->slides become all white and the content of aaa.pptx will not appear. By controlling the task of Windows, I see that the program powerpnt.exe is running, only that the file aaa.pptx not shown.
    There is anyone who has worked with objects QAxWidget to help me to understand where I'm wrong?

    FullScreen::FullScreen(QWidget *parent) :
    QMainWindow(parent), ui(new Ui::FullScreen)
    {
    ui->setupUi(this);  
    if(!ui->slides->setControl("PowerPoint.Application"))
      {
        QMessageBox::critical(this, trUtf8("Error PPT"), "Install Microsoft Power Point (R) for support PPT!");
      }
        ui->slides->setControl("C:\\aaa.pptx");
    }
    

    thank you in advance
    blackout69


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.