Re: [PyQt] sip fails with "[CLASSNAME] has not been defined"

2012-05-01 Thread tuxor1337
You are right, that's indeed a rather obvious option. Thanks again for 
your patience :)



You use SIP to describe the bindings you want to create - this is not
necessarily the same as the API of the underlying library. In other words
you don't teach SIP to cut off the "ui" from the namespace, just don't tell
it about it in the first place. The issue then is to make sure that the
generated code compiles - probably by including appropriate "using"
statements in the right places. Take a look at the use of the
%UnitPostIncludeCode directive in the PyQtMobility bindings.

Phil


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Segmentation fault. What could be the cause?

2012-05-01 Thread tuxor1337

Thanks, that worked :) Now everything is running fine.


You definitely need to remove all the /TransferThis/ except for the
one on the parent argument.

Phil


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Segmentation fault. What could be the cause?

2012-05-01 Thread Phil Thompson
On Tue, 01 May 2012 12:04:19 +0200, tuxor1...@web.de wrote:
> Hi all,
> 
> in one of my SIP files I have this line (a class constructor):
> 
> MessageDialog(QMessageBox::Icon icon /TransferThis/,
> const QString & title /TransferThis/,
> const QString & text /TransferThis/,
> QMessageBox::StandardButtons buttons /TransferThis/ = 
> QMessageBox::NoButton,
> QWidget * parent /TransferThis/ = 0);
> 
> When refering to this constructor later in my Python code, the following

> lines will cause a segmentation fault
> 
> app = QApplication(argv)
> about = ui.MessageDialog(QMessageBox.Icon(QMessageBox.Information), 
> app.tr(argv[1]), app.tr(argv[2]), QMessageBox.No | QMessageBox.Yes)
> 
> Can this be caused by the TransferThis annotation? Or by the "&" C++ 
> reference to the QString? Or do you see something else, that's wrong 
> with this?
> 
> 
> ##
> If you want to have a closer look at the project, see here:
> 
> https://github.com/tuxor1337/PyOnyx
> 
> The problematic line is in ui/message_dialog.sip.

You definitely need to remove all the /TransferThis/ except for the one on
the parent argument.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] sip fails with "[CLASSNAME] has not been defined"

2012-05-01 Thread Phil Thompson
On Tue, 01 May 2012 09:57:38 +0200, tuxor1...@web.de wrote:
> I think, I can answer my own question. But only with respect to the 
> _reason_ for this behaviour. I have to admit, that I don't like this 
> behaviour:
> 
> The problem is the "namespace ui". Because OnyxDialog is defined in that

> namespace, it has to be referred to as ui::OnyxDialog in 
> "message_dialog.sip", even though it's being referred to in the very 
> same namespace.
> 
> What I don't like about that revelation: It seems like there is no way 
> to teach SIP to cut off the "ui" from the namespace. In Python, I will 
> always have to refer to the classes via PyOnyx.ui.ui.MessageDialog. Of 
> course, that alone is not the problem. But the problem is, that I can do

> things like "from PyOnyx.ui import ui", but not something like "from 
> PyOnyx.ui.ui import *". And later, when I have a namespace called "sys",

> this is even going to conflict with the Python module of the same name.
> 
> I would love to have a module called "PyOnyx.ui" and the classes 
> "MessageDialog" and "OnyxDialog" as direct parts of that module. Is 
> there any possibility to achieve this with SIP 4.12.2?

You use SIP to describe the bindings you want to create - this is not
necessarily the same as the API of the underlying library. In other words
you don't teach SIP to cut off the "ui" from the namespace, just don't tell
it about it in the first place. The issue then is to make sure that the
generated code compiles - probably by including appropriate "using"
statements in the right places. Take a look at the use of the
%UnitPostIncludeCode directive in the PyQtMobility bindings.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQwt and PyQt 4.9

2012-05-01 Thread V. Armando Sole



On 01.05.2012 14:07, Mark Mordeca wrote:

This is disappointing.  I was about to try this very thing myself.

Does anyone know what is the latest version of PyQt/Qt that works 
with

PyQwt 5.2?




Well, I cannot talk about MacOS.

I have it working with PyQt version 4.9.1 and sip 4.13.2 on a windows 
64-bit machine.


Armando
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQwt and PyQt 4.9

2012-05-01 Thread Mark Mordeca
This is disappointing.  I was about to try this very thing myself.

Does anyone know what is the latest version of PyQt/Qt that works with
PyQwt 5.2?

Thanks,
Mark

-Original Message-
From: pyqt-boun...@riverbankcomputing.com
[mailto:pyqt-boun...@riverbankcomputing.com] On Behalf Of William
Kyngesburye
Sent: April-30-12 10:07 PM
To: mitja_mr...@indiana.edu
Cc: pyqt@riverbankcomputing.com
Subject: Re: [PyQt] PyQwt and PyQt 4.9

Well, though I seemed to have some initial success with it, it's not
working for me now.  I think what David Kaufman said is true - PyQwt does
not work with PyQt 4.9.

On Apr 30, 2012, at 8:42 PM, mitja_mr...@indiana.edu wrote:

> Hello,
>
> I keep getting errors when trying PyQwt with PyQt 4.9.1 on Snow Leopard.
> I've tried the PyQwt version 5.2.0 as found on
> http://pyqwt.sourceforge.net/download.html
> as well as a 5.2.1 version PyQwt-5.2.1-cvs20100927-101816.tar.bz2 from
OpenSuse, but neither seems to produce usable results.
>
> Two quick questions...
>
> * is there a "latest" PyQwt 5.2.1 available (e.g. SVN repository) ?
>
> * any specific configuration changes required to build PyQwt on Snow
Leopard or Lion, to make it work with PyQt 4.9.x?
>
> Thank you in advance,
> -Mitja
>
>
>
> William Kyngesburye, Tue, 24 Jan 2012 18:48:17 -0800:
>> It doesn't?  Works for me.  I recompiled PyQwt 5.2.1 (SVN) for PyQt 4.9
with no problems.  A plugin for QGIS that uses PyQwt still works.
>>
>> Just wondering if I'm missing something.
>>
>> (OS X 10.7, Python 2.7.1, PyQt 4.9, Qt 4.8.0)
>>
>> On Jan 24, 2012, at 12:22 PM, David Kaufman wrote:
>>
>>> Hi there,
>>>
>>> I'm currently developing with PyQwt. Unfortunately it doesn't
>>> support PyQt 4.9 yet. Thus I really need an older PyQt version, to
>>> be specific PyQt v4.8.6, but I'm not able to find it anywhere. I
>>> need a binary version for Python 2.7 32 bit. If anyone could point
>>> me in the right direction?
>>>
>>> Greetings,
>>> David Kaufman
>>> ___
>>> PyQt mailing listPyQt at riverbankcomputing.com
>>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>> -
>> William Kyngesburye 
>> http://www.kyngchaos.com/
>>
>> Earth: "Mostly harmless"
>> - revised entry in the HitchHiker's Guide to the Galaxy
>
>
> ___
> PyQt mailing listPyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt

-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] ANN: eric 5.2.2 released

2012-05-01 Thread Detlev Offenbach
Hi,

I just uploaded eric 5.2.2. It is a maintenance release fixing some bugs. It 
is available via the eric web site.

http://eric-ide.python-projects.org/index.html

Regards,
Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de



___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] ANN: eric 4.5.3 released

2012-05-01 Thread Detlev Offenbach
Hi,

I just uploaded eric 4.5.3. It is a maintenance release fixing some bugs. It 
is available via the eric web site.

http://eric-ide.python-projects.org/index.html

Regards,
Detlev
--
Detlev Offenbach
det...@die-offenbachs.de



___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Segmentation fault. What could be the cause?

2012-05-01 Thread tuxor1337

Hi all,

in one of my SIP files I have this line (a class constructor):

MessageDialog(QMessageBox::Icon icon /TransferThis/,
   const QString & title /TransferThis/,
   const QString & text /TransferThis/,
   QMessageBox::StandardButtons buttons /TransferThis/ = 
QMessageBox::NoButton,

   QWidget * parent /TransferThis/ = 0);

When refering to this constructor later in my Python code, the following 
lines will cause a segmentation fault


app = QApplication(argv)
about = ui.MessageDialog(QMessageBox.Icon(QMessageBox.Information), 
app.tr(argv[1]), app.tr(argv[2]), QMessageBox.No | QMessageBox.Yes)


Can this be caused by the TransferThis annotation? Or by the "&" C++ 
reference to the QString? Or do you see something else, that's wrong 
with this?



##
If you want to have a closer look at the project, see here:

https://github.com/tuxor1337/PyOnyx

The problematic line is in ui/message_dialog.sip.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] sip fails with "[CLASSNAME] has not been defined"

2012-05-01 Thread tuxor1337
I think, I can answer my own question. But only with respect to the 
_reason_ for this behaviour. I have to admit, that I don't like this 
behaviour:


The problem is the "namespace ui". Because OnyxDialog is defined in that 
namespace, it has to be referred to as ui::OnyxDialog in 
"message_dialog.sip", even though it's being referred to in the very 
same namespace.


What I don't like about that revelation: It seems like there is no way 
to teach SIP to cut off the "ui" from the namespace. In Python, I will 
always have to refer to the classes via PyOnyx.ui.ui.MessageDialog. Of 
course, that alone is not the problem. But the problem is, that I can do 
things like "from PyOnyx.ui import ui", but not something like "from 
PyOnyx.ui.ui import *". And later, when I have a namespace called "sys", 
this is even going to conflict with the Python module of the same name.


I would love to have a module called "PyOnyx.ui" and the classes 
"MessageDialog" and "OnyxDialog" as direct parts of that module. Is 
there any possibility to achieve this with SIP 4.12.2?


Am 01.05.2012 00:32, schrieb tuxor1...@web.de:

Hi all,

maybe somebody can help me with this. I'm using SIP 4.12.2.

My configure.py script is executing the following sip command line:

/opt/python/bin/sip -c . -b ui/ui.sbf -I /opt/python/share/sip/PyQt4 -x
PyQt_Accessibility -x PyQt_Cursor -x PyQt_ImageFormat_JPEG -x
PyQt_Picture -x PyQt_PrintDialog -x PyQt_Printer -x PyQt_ProgressDialog
-x PyQt_QWS_Cursor -x PyQt_SessionManager -x PyQt_Sound -x VendorID -t
WS_QWS -x PyQt_Accessibility -x PyQt_SessionManager -x PyQt_PrintDialog
-x PyQt_Printer -x PyQt_PrintPreviewDialog -x PyQt_PrintPreviewWidget -x
PyQt_NoPrintRangeBug -x PyQt_qreal_double -t Qt_4_7_2 -x Py_v3 -g
ui/uimod.sip

... which looks okay to me.

But it fails with this error message:

sip: OnyxDialog has not been defined

The sip-file "ui/uimod.sip" looks like this:


%Module PyOnyx.ui

%Include onyx_dialog.sip
%Include message_dialog.sip


The error is obviously related to the file "message_dialog.sip", because
when I leave out that file, everything is fine.

## message_dialog.sip 
%Import QtGui/QtGuimod.sip

namespace ui
{

class MessageDialog : OnyxDialog
{

%TypeHeaderCode
#include "onyx/ui/message_dialog.h"
%End

public:
MessageDialog(QMessageBox::Icon icon,
const QString & title,
const QString & text,
QMessageBox::StandardButtons buttons = QMessageBox::NoButton,
QWidget * parent = 0);
~MessageDialog();

public:
int exec();
void updateInformation(const QString & text);
};

};
## End: message_dialog.sip 


## onyx_dialog.sip 
%Import QtGui/QtGuimod.sip

namespace ui
{

class OnyxDialog : QDialog
{

%TypeHeaderCode
#include "onyx/ui/onyx_dialog.h"
%End

public:
OnyxDialog(QWidget *parent, bool show_shadow = true);
~OnyxDialog();
};

};
## End: onyx_dialog.sip 
___
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt