PDA

View Full Version : QAxWidget



chak_med
8th September 2006, 08:54
I'm using Qt4.1.4 and I want to know how to display PDF file inside QAxWidget,
I didn't use ActiveQt yet ,
can somebody help me ?

RafalR
10th September 2006, 20:05
I show you the simple example:

QAxWidget* Widget = new QAxWidget(this);
Widget->setControl(QString::fromUtf8("{8856F961-340A-11D0-A96B-00C04FD705A2}"));
Widget->dynamicCall("Navigate(const QString&)", QString("http://qtcentre.org"));

It opens Internet Explorer in the widget and navigates to http://qtcentre.org.
(It is also the way to opening pdf, but it is ugly sollution ;) )
I never had to embed PDF Reader but you should change ID given in setControl() method to PDF Reader`s ID, and probably change the name of the method called via dynamicCall().
I think this information are available on Adobe`s site, but I'm not sure.