
其中關鍵代碼如下:
void MainWindow::OpenWord(QString &filename)
{
this->CloseOffice();
officeContent_ = new QAxWidget("Word.Application", this->ui->widget);
officeContent_->dynamicCall("SetVisible (bool Visible)","false");//不顯示表單
officeContent_->setProperty("DisplayAlerts", false);
auto rect = this->ui->widget->geometry();
officeContent_-> setGeometry(rect);
officeContent_->setControl(filename);
officeContent_->show();
}
uj5u.com熱心網友回復:
呼叫updateuj5u.com熱心網友回復:
方法1:按住Ctrl、然后滾動滑鼠滾輪可以將檔案放大。方法2:在officeContent_->show() 前面增加延時。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/90021.html
標籤:Qt
下一篇:免費根據商品條碼查詢商品的介面
