Re: [PyQt] %ConvertToSubClassCode across modules

2008-05-31 Thread Gerard Vermeulen
On Fri, 30 May 2008 23:41:57 +0100
Phil Thompson [EMAIL PROTECTED] wrote:

[ snip ]
  But what can I do about this? It'd be nice to avoid some kind of
  runtime RTTI list that the submodule appends to on startup, but if
  that's what I have to do, that's alright ;) Just thought I'd check
  here first for any ideas.
 
 Your class (or your code) has to provide some form of RTTI. QEvent
 provides type(), QObject provides inherits().
 
You can also rely on the RTTI provided by the compiler (seems to not
always work on Windows). PyQwt has code like:

%If (CXX_DYNAMIC_CAST)
%ConvertToSubClassCode
// Walk the inheritance tree depth first in alphabetical order
// This code is for Qwt4 and Qwt5
#ifdef sipClass_QwtArrayData
if (dynamic_castconst QwtArrayData *(sipCpp))
sipClass = sipClass_QwtArrayData;
else
#endif
#ifdef sipClass_QwtDoublePointData
if (dynamic_castconst QwtDoublePointData *(sipCpp))
sipClass = sipClass_QwtDoublePointData;
else
#endif
#ifdef sipClass_QwtPolygonFData
if (dynamic_castconst QwtPolygonFData *(sipCpp))
sipClass = sipClass_QwtPolygonFData;
else
#endif
#ifdef sipClass_QwtData
if (dynamic_castconst QwtData *(sipCpp))
sipClass = sipClass_QwtData;
else
#endif
sipClass = 0;
%End
%End

Gerard

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


[PyQt] webView webPage

2008-05-31 Thread [EMAIL PROTECTED]
Hi
I'm trying to make a special web navigator with the webview.
But I like to manage the weblinks. With signal clickedLink I see that this
is what I want, but don't work if I dont define to use this signal. This I
see I can do with  linkDelegationPolicy. I cannot define
linkdelegationpolicy on a webview. Only on a webpage class.

The questions are:
 - It's better use webview or other widget to navigate throug own HTML with
own link management?

 - What influence webpage has on webview. Because webpage has a lot of
functions that webview does not inherits.

 - Can I use webpage to see html, and how I use it?


I try to find examples and documentation on google but it's too new, and
documentation and examples for pyqt does not exists.


Sorry my english. Tnx 4 all

Adonay


myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting



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


Re: [PyQt] webView webPage

2008-05-31 Thread gwhite
1. A WebView is ideal if you are Qt4.4+
2. A WebView contains a WebPage. The WebView is a widget, whereas the WebPage
is not - the WebView is the visual representation of the web page, hence the
name.

3. When you create a WebView, it contains a WebPage. Add the WebView to one of
your widgets. You use the page() member function of WebView to get the WebPage,
and you can then set the link delegation policy and connect signals to that
page object.
This all works very well, BTW.
___

From: [EMAIL PROTECTED]
To: pyqt@riverbankcomputing.com
Sent: 05/31/2008 05:58 AM
Received: 05/31/2008 06:05 AM
Subject: [PyQt] webView  webPage


Hi
I'm trying to make a special web navigator with the webview.
But I like to manage the weblinks. With signal clickedLink I see that this
is what I want, but don't work if I dont define to use this signal. This I
see I can do with  linkDelegationPolicy. I cannot define
linkdelegationpolicy on a webview. Only on a webpage class.
The questions are:
 - It's better use webview or other widget to navigate throug own HTML with
own link management?
 - What influence webpage has on webview. Because webpage has a lot of
functions that webview does not inherits.
 - Can I use webpage to see html, and how I use it?
I try to find examples and documentation on google but it's too new, and
documentation and examples for pyqt does not exists.
Sorry my english. Tnx 4 all
Adonay

myhosting.com - Premium Microsoft� Windows� and Linux web and application
hosting - http://link.myhosting.com/myhosting
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Bug - PyQt 4.4.2 and Matplotlib 0.91.2

2008-05-31 Thread Darren Dale
On Friday 30 May 2008 5:22:44 pm Pierre Raybaut wrote:
 Hi,

 I found out a performance bug when embedding a Matplotlib 0.91.2 canvas
 in a PyQt 4.4.2 object: the pan/zoom feature is very slow (with PyQt
 4.3.3, and the exact same scripts, pan/zoom is real-time).

 I am posting this in Matplotlib mailing-list too, but I thought that
 maybe some of you could have an idea about this?

I don't think it is appropriate to post here unless it can be demonstrated 
that there is a performance issue specifically related to PyQt and not 
Matplotlib or Qt. We continue this discussion on the matplotlib mailing list.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Can't create a QImage?

2008-05-31 Thread Piotr Antoniak
Hi! I'm very new to PyQt (just started using it today) and also quite new to Qt 
in general... I have a problem creating a QImage. No matter what I do, it 
creates a null one... here's the output I get after I try to create a 10x10 
QImage: gt;gt;gt; image = qt.QImage(qt.QSize(10,10), 4)
gt;gt;gt; image.width()
0
gt;gt;gt; image.height()
0
gt;gt;gt; image.depth()
0
The third parameter means the RGB32 format... for some reason, when I type 
qt.QImage.Format_RGB32 there instead, I get the error AttributeError: 
Format_RGB32. Can someone help me create a QImage? By the way, if I replace 
qt.QSize(10,10) with simply 10, 10 the result is exactly the same...___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt