用QAxWidget来显示word文档时,显示画面很小怎么解决?

ziyucha 2017-10-26 05:19:22


其中关键代码如下:
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();
}
...全文
1512 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
戈** 2019-11-14
  • 打赏
  • 举报
回复
方法1:按住Ctrl、然后滚动鼠标滚轮可以将文档放大。
方法2:在officeContent_->show() 前面增加延时。
  • 打赏
  • 举报
回复
调用update

16,817

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧