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

Phil Thompson phil at riverbankcomputing.com
Mon Apr 11 10:18:03 BST 2016


On 11 Apr 2016, at 10:16 am, Frost Ming <frost.ming at asml.com> wrote:
> 
> 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.

Try using the fully scoped class name.

Phil


More information about the PyQt mailing list