473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

sip problem (was: swig problem)

Torsten Marek wrote:
Unless you insist on using swig (in that case, I can't help you), you
might want to try out sip (www.riverbankcomputing.co.uk/sip) to work
with Qt and Python. To find out how to get your (own) Qt classes to work
with Python, you can have a look at the interface files of PyQt, there
are plenty of examples.


I'm not fixed on swig, thats just what I came up with first. If sip holds
what it promises I'd rather use sid, i.e. better Python support.

So I installed it, read the documentation and I'm stuck again. My
specification file does not work. Its really pretty straight forward:

--snip--
class QListViewItemNumeric : QListViewItem {
%TypeHeaderCode
#include "qlistviewitemnumeric.h"
%End
public:
QListViewItemNumeric( QListView * );
virtual void setNumeric( int );
virtual QString key( int, bool ) const;
};
--snip--

Although the C++ files contain more methods; I just wanted to get started
with a small test-version.

I couldn't find a documentation of the %* directives and took what I could
gatherd from the PyQt examples.

So when I call sip:

$ sip qlistviewitemnumeric.sip
sip: qlistviewitemnumeric.sip:1: class definition not allowed in a C module

I even tried this with a default pyqt qtimer.sip file. There sip doesn't
like the "%If (QT_2_0_0 -)" directive.

Any ideas?

Thanks
Uwe
Jul 18 '05 #1
0 919

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt Whelan | last post by:
Supposedly, recent versions of SWIG can be made to work with MS VC++'s non-standard integer data types. According to a recent SWIG ChangeLog entry: %apply long long { __int64 }; should make...
0
by: Phil Schmidt | last post by:
I'm attempting to follow the instructions at http://sebsauvage.net/python/mingw.html, without luck. I have Python 2.3, MinGW 3.2.3, ans SWIG 1.3.19. I get an export error on "initexample" when...
0
by: Jon Moldover | last post by:
Hi, I'm using Python in my win32 app by linking to the python23.dll. I'm trying to expose some c++ code in my app to Python so I can make application calls from Python scripts (according to the...
0
by: Oliver Tengler | last post by:
Hi, I wrap the following code with SWIG: class Bar {}; class Foo { public: const Bar* getBar() { return &m_bar; }
92
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
10
by: Bart Ogryczak | last post by:
Hi, I´m looking for some benchmarks comparing SWIG generated modules with modules made directly with C/Python API. Just how much overhead does SWIG give? Doing profile of my code I see, that it...
0
by: Frank | last post by:
Hi, I have the following problem: I want to call a cpp program from python. Let's call this cpp program fct. The problem is that I will parse a large array, say M1, to fct and also receive a...
1
by: cody314 | last post by:
Versions: Python 2.5.1 (r251:54863, May 14 2007, 10:50:04) SWIG Version 1.3.20 Hello I have some code that wraps a C++ library so I may use it in python. The code basically just gets some data...
1
by: Stodge | last post by:
Yet another SWIG question (YASQ!). I'm having a problem with using an abstract base class. When generating the Python bindings, SWIG thinks that all the concrete classes that derive from this...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.