Hello,
I am working on application which is being developed in Qt on Windows. I need to display
PDF file on dialog in Activex Control. I used QAxWidget control in qt and embed
Acrobat Browser Control on it. I used Acrobat Browser Control type Library to preview
PDf file in QAxWidget. Following is code snippet:
pdf=new PdfWidget(this);
pdf->setGeometry(60,30,500,480);
pdf->dynamicCall("LoadFile(const QString&)","D:\\cryptkey.pdf");
pdf->dynamicCall("setShowScrollbars(bool)","false");
pdf->dynamicCall("setShowToolbar(bool)","false");
pdf->dynamicCall("setPageMode(const QString&)","none");
where pdfWidget is class inherited from QAxWidget. I need to disable mouse and key events on PDF file displayed in Activex control. So I override mousePressEvent() of QAxWidget class and used its ignore() to disable mouse clicks
void PdfWidget::mousePressEvent( QMouseEvent * event )
{
event->ignore();
}
This works fine if no file is loaded in Acrobat Browser control but After a PDF file is loaded it does not recieve any events.
I think Acrobat Browser control has taken the control and now how I will handle the mouse events on Acrobat Activex control so that I can disable the mouse clicks on PDf file displayed in it.
I have read in QAxWidget documentation
"However, you cannot reimplement Qt-specific event handlers like mousePressEvent or keyPressEvent and expect them to be called reliably. The embedded control covers the QAxWidget completely, and usually handles the user interface itself. Use control-specific APIs (i.e. listen to the signals of the control), or use standard COM techniques like window procedure subclassing."
Please help me out as I have little knowledege in COM techniques and how I will handle Activex controls events to disable mouse clicks.
Waiting for reply................
Bookmarks