Questions tagged [qaxwidget]

The QAxWidget class is a QWidget that wraps an ActiveX control.

A QAxWidget can be instantiated as an empty object, with the name of the ActiveX control it should wrap, or with an existing interface pointer to the ActiveX control. The ActiveX control's properties, methods and events which only use QAxBase supported data types, become available as Qt properties, slots and signals. The base class QAxBase provides an API to access the ActiveX directly through the IUnknown pointer.

QAxWidget is a QWidget and can mostly be used as such, e.g. it can be organized in a widget hierarchy and layouts or act as an event filter. Standard widget properties, e.g. enabled are supported, but it depends on the ActiveX control to implement support for ambient properties like e.g. palette or font. QAxWidget tries to provide the necessary hints.

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.

QAxWidget also inherits most of its ActiveX-related functionality from QAxBase, notably dynamicCall() and querySubObject().

Warning: You can subclass QAxWidget, but you cannot use the Q_OBJECT macro in the subclass (the generated moc-file will not compile), so you cannot add further signals, slots or properties. This limitation is due to the metaobject information generated in runtime. To work around this problem, aggregate the QAxWidget as a member of the QObject subclass.

http://doc.qt.io/qt-4.8/qaxwidget.html

14 questions
2
votes
3 answers

PyQt: How to send parameters by reference with QAxWidget

I'm attempting to use PyQt to talk to an ActiveX COM object in Python. This method works in Python: myobj.dynamicCall('SetAbsMovePos(int, double)', [0, 10]) However, I can't send arguments by reference. From the docs, the method I wish to call…
101
  • 8,514
  • 6
  • 43
  • 69
1
vote
0 answers

How to center word document in QAxWidget on first show

I have prepared this example: import sys from PyQt5.QtWidgets import (QApplication, QMainWindow) from PyQt5 import uic from PyQt5.QAxContainer import QAxWidget class MainForm(QMainWindow): def __init__(self, parent=None): …
accpert.com
  • 109
  • 11
1
vote
1 answer

Linker error when adding QAxWidget to empty project

I have an empty project, and I added a QAxWidget in Qt Designer. The project compiled before adding the QAxWidget, but now it fails with this linker error: mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
1
vote
1 answer

Is it possible to turn off Internet Explorer Compatibility View in Qt QAxWidget?

I'm using QAxWidget to show pages trough Internet Explorer 11, and it is showing me all the pages in the "compatibility view", although they aren't set in the Internet Explorer itself. Is it possible to turn that off, and to have the component to…
Dushan Savich
  • 178
  • 15
1
vote
1 answer

QAxWidget don’t display

I used QWidget show as a dialog. And put QAxWidget as a subwidget. But if I set the parent widget transparent, the QAxWidget will not display. QWidget* widget = new QWidget; widget->setAttribute(Qt::WA_TranslucentBackground); ......; QAxWidget*…
lvshuchengyin
  • 235
  • 1
  • 4
  • 19
0
votes
1 answer

QAxWidget glitches when resizing GUI window

I am currently exploring the possibilities of displaying and working with PowerPoint presentations in a GUI using PyQt5/PyQt6 and Python. For that I found the most promising solution to be using a QAxWidget. Loading and displaying the pptx-file…
0
votes
0 answers

How to insert image in excel using QAxObject in Qt c++

How to insert image in excel using QAxObject in Qt c++? I am not able to add image in excel using QAxObject in Qt please help if any one is aware of it I tried using : Pixmap pixmap(imagePath); sheet->querySubObject("Cells(int, int)", 2,…
0
votes
1 answer

QEventLoop in QAxWidget instance failed

I'm working on terminal based PyQt application using Windows OCX api. And I'm having trouble over implement(calling exec) QEventLoop in QAxWidget instance. If I call exec() in main QApplication main loop, everthing is fine. But, calling exec() in…
DWONH
  • 1
  • 3
0
votes
0 answers

PyQt5 QMainWindow/QAxWidget thread problem

I want to have different thread between QMainWindow and QAxWidget. As I know, QMainWindow should have MainThread. So I write down code as below. from PyQt5 import QtCore, QtGui, QtWidgets import sys class Main_Thread(QtWidgets.QMainWindow): def…
0
votes
1 answer

QAxWidget steals focus from client application

Calling a functions that changes the GUI of an QAxWidget makes the caller loose focus. How can I avoid this?
jaba
  • 735
  • 7
  • 18
0
votes
2 answers

Document Completed Signal inside qt using QAxWidget

I'm Using qt Built-in Examples in /examples/activeqt/webbrowser, and i'm trying to use DocumentComplete SIGNAL. my purpose is using embedded Internet explorer inside QAxWidget and popup a message (with contetnt from the website) after…
0
votes
1 answer

How to use QAxWidget browser to open url with WebGl content

I'm using QT 5.8 and trying to load webpage using QAxWidget (set to IE) that displays HTML 5 empty canvas. QString url = "https://h3manth.com/demo/canvas/full-page.html"; ui.browser->dynamicCall("Navigate(const QString&)", url); Running the same…
marcin
  • 125
  • 1
  • 14
0
votes
2 answers

Qt Activex MainWindow on TabWidget becomes unresponsive

I have a very strange problem. The application is based on Qt C++. There is a TabWidget whose tabs are created dynamically. The tab contains QtMainWindow in ActiveX widget. When multiple apps are started, the selected one works fine. But when…
user967400
  • 53
  • 5
0
votes
0 answers

Unknown module(s) in QT: axcontainer

Well I can't make qt recognize axcontainer, I need to use a QAxWidget to display a .doc but I'm struggling with this. Here is my .pro QT += core gui QT += axcontainer QMAKE_CXXFLAGS += -std=c++11 greaterThan(QT_MAJOR_VERSION, 4): QT +=…
Sandlord
  • 89
  • 3
  • 9