[PyQt] How to export a utility function using SIP?

Frost Ming frost.ming at asml.com
Mon Apr 11 10:16:09 BST 2016


In ChartPanelBase.sip:

namespace lib {

namespace infra {

namespace chartplot {

class ChartPanelBase

{

public:

%TypeHeaderCode

...

%End

// Some API

};

}; // namespace chartplot

}; // namespace infra

}; // namespace lib

And is exported successfully.

In util.sip:

namespace lib {

namespace infra {

namespace chartplot {



int foo1(ChartPanelBase* var);

int foo2(ChartPanelBase* var);

int foo3(ChartPanelBase* var);

}; // namespace chartplot

}; // namespace infra

}; // namespace lib

When I try to run configure.py, gives Error : sip: ChartPanelBase is undefined.



Thanks.



-----Original Message-----
From: Phil Thompson [mailto:phil at riverbankcomputing.com]
Sent: Monday, April 11, 2016 5:09 PM
To: Frost Ming
Cc: pyqt at riverbankcomputing.com
Subject: Re: [PyQt] How to export a utility function using SIP?



On 11 Apr 2016, at 9:54 am, Frost Ming <frost.ming at asml.com<mailto:frost.ming at asml.com>> wrote:

>

> Hi,

> I want to export a utility function so that I can call it from python, it gets an argument whose type has been exported in other sip file. I tried many times but failed, I also searched the document and cannot get an idea?

> Any help?



You need to show what you have tried.



Phil

-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. The sender nor the company/group of companies he or she represents shall be liable for the proper and complete transmission of the information contained in this communication, or for any delay in its receipt.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160411/93e0510d/attachment-0001.html>


More information about the PyQt mailing list