You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Guest

Unregistered

1

Wednesday, March 23rd 2005, 8:24am

How to get HTML param in widget ?

HI,

I would like to get the value of parameters I define in html in the code. And I just cant' seem to get that work..
Let me explain...

I have this object in html :
<object ID="id" CLASSID="..........." CODEBASE="file://.........">
<PARAM NAME="Name" VALUE="P0001">
<PARAM NAME="Value" VALUE="10">
</object>

My custom widget is made into an activex object using AxFactory.

What do I have to do to get these values : P0001 and 10 in the widget constructor ?
I tried defining Q_PROPERTY in my widget but I can't figure out if or how it's supposed to work.
It's frustrating, I feel like I am missing something fairly easy.

Can someone help me ?

Thanks in advance ?

Guest

Unregistered

2

Thursday, March 24th 2005, 8:22am

Anybody has an idea ?

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

3

Thursday, March 24th 2005, 8:25am

Could you elaborate on the problem? I think we don't understand what you want.

Guest

Unregistered

4

Thursday, March 24th 2005, 12:19pm

Ok, I'll try to explain better.

I designed a custom widget. I transformed this widget into an ActiveX object using QAxFactory. I obtain a dll

Then, with the HTML code of my first post, I insert my widget in an HTML page.

When the page is loaded, the ActiveX is loaded and my widget is created by QAxFactory:create(). This part is working fine.

The <object> tag allows to define <PARAM> elements. These parameters usually allow to configure the object. This is what I want to do. I want to have access to these <PARAM> elements in the constructor of my widget to initialize it. But I can't figure it out how to do that.

Hopefully, I am clear enough this time.

Thanks.

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

5

Thursday, March 24th 2005, 4:02pm

Well... I don't know much about ActiveX, but you should call some function from it (as it is a component that implements services using interfaces and such). Maybe read QAxObject documentation, there is a section there describing the mapping of Qt Object to COM.