PDA

View Full Version : Problems with ACtiveQT in calling a routine



franco.amato
15th April 2010, 01:00
Hi,
I'm using a com object with ActiveQt.
I would call this routine:


QVariant TerminalInfo (int nReceTimeOut) [slot]
Connect a signal to this slot:
QObject::connect(sender, SIGNAL(someSignal(int)), object, SLOT(TerminalInfo(int)));
Or call the function directly:
QVariantList params = ...
QVariant result = object->dynamicCall("TerminalInfo(int)", params);
Generated with generateDocumentation().

Looking at the visual basic example it returns 10 objects of string.

This is a visual basic example:

Dim aInfo() As String = myTerminal.TerminalInfo

ListBox2.Items.Add("Device Name: " & aInfo(0).ToString)
ListBox2.Items.Add("Location: " & aInfo(1).ToString)
ListBox2.Items.Add("Model: " & aInfo(2).ToString)
ListBox2.Items.Add("IP Address: " & aInfo(3).ToString)
ListBox2.Items.Add("SubMask: " & aInfo(4).ToString)
ListBox2.Items.Add("GateWay: " & aInfo(5).ToString)
ListBox2.Items.Add("MAC: " & aInfo(6).ToString)
ListBox2.Items.Add("ManIP: " & aInfo(7).ToString)
ListBox2.Items.Add("TID: " & aInfo(8).ToString)
ListBox2.Items.Add("Language: " & aInfo(9).ToString)
ListBox2.SelectedIndex = ListBox2.Items.Count - 1
myTerminal.BF20RelayControl(4, 2, False)

I don't know how to call the routine using Qt and ActiveQt.

This is the documentation of the routine written by the provider:

TerminalInfo
nReceTimeOut(Default 100)

Array(0):Device Name
Array(1):Location
Array(2):Model
Array(3):IP Address
Array(4):SubMask
Array(5):GateWay
Array(6):MAC
Array(7):ManIP
Array(8):TID
Array(9):Language

I would have a help calling it in Qt anc C++.

Thank you