CONFIG += qaxcontainer
#include <QAxWidget>
QAxWidget* officeContent = new QAxWidget(this);; QString filename = "1.pdf"; officeContent= new QAxWidget("Microsoft Web Browser"); QVariant v = officeContent->dynamicCall("Navigate(const QString&)", filename);
QString filename = "1.pdf"; QDesktopServices::openUrl(QUrl::fromLocalFile(filename ));
发表评论