Qt-interest Archive, May 2007
Why QLabel can not be an ActiveX control?
Message 1 in thread
Why QLabel can not be an ActiveX control? It Sounds Weird:-)
This question is about a Qt example at:
C:\Qt\4.3.0beta\examples\activeQt\wrapper
The Wrapper example demonstrates how to export existing QWidget classes
as ActiveX controls, and the use of QAxFactory together with the
QAXFACTORY_EXPORT() macro.
What I did is nothing more than a copy cat --- add “QLabel” to the
featureList:
list << "QLabel";
also to createObject():
if ( key == "QLabel" ) return new QLabel(0);
to metaObject():
if ( key == "QLabel" ) return &QLabel::staticMetaObject;
and supply three new ids generated by uuidgen.
Then, rebuild solution, so far so good. “Server registered successfully!”
To test it, I started PowerPoint, from menu: “QLabel Class” from “View
-> Toolbars -> Control Toolbox -> Toolbar Options -> More Controls”.
I saw “QLabel Class”and all the others, such as, “QCheckBox Class”,
“QRadioButton Class” . . .
It surprised me when I choose “QLabel” to insert:
“Object library invalid or contains references to object definitions
that could not be found” :-(
If I choose the others to insert, all works fine!
What’s wrong with "QLabel" here?
I use qt-win-commercial-4.3.0beta-vs2003.exe, WindowsXP, and Microsoft
Office 2003.
Thanks in advance.
Lingfa
--
[ signature omitted ]