Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Open a PowerPoint inside QMainWindow
Forum Updated to NodeBB v4.3 + New Features

Open a PowerPoint inside QMainWindow

Scheduled Pinned Locked Moved General and Desktop
qaxwidget power
1 Posts 1 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • blackout69B Offline
    blackout69B Offline
    blackout69
    wrote on last edited by blackout69
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved