[PyQt] (sort of) beginner question on pyuic4

2008-06-01 Thread Matt
Hi,

I'm having a bit of trouble with pyuic4.  I've made a few pyqt apps using 
pyqt3 (nothing particularly complicated - and I'm no programmer, just a 
hobbyist), and am now trying to port them over to pyqt4.  However, I'm not 
sure I'm doing things right.

I usually design the gui layout using qt designer, and then create the 
functions that are triggered by signals and slots using a .ui.h file.  Using 
pyqt3, I'd then create the .py file using pyuic, which would pick up 
the .ui.h file and combine it into the .py file.  However, pyuic4 doesn't 
seem to do that anymore.

If at all possible, could someone explain how .ui.h files fit into the mix in 
pyqt4, or point me to a good tutorial - I have searched online, but nothing 
seems to deal with this point very well.

Another question I have is that pyuic used to take a -tr option - this option 
doesn't exist in pyqt4.  Is there an explanation somewhere about how 
translations now work in pyqt4?
-- 
Regards

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


Re: [PyQt] QVariant and Python list

2008-06-01 Thread Phil Thompson
On Wednesday 28 May 2008 6:35:32 pm Laurent Léonard wrote:
> Hi,
>
> I read QList and QMap are not implemented in PyQt, because of the presence
> of Python lists and dictionaries.
>
> But how can I use QVariant to "encapsulate" Python lists and dictionaries ?
> When I try to do it I get the following error message : "TypeError:
> argument 1 of QVariant() has an invalid type"

Tonight's snapshot will make sure that all Python lists and dicts will be 
treated as Python objects by QVariant and retrievable with toPyObject().

I haven't gone as far as I had originally proposed (applying /Constrained/ 
throughout) as I think it will break too many things - particularly 
QVariant("am I a QString or a Python object?")

Phil

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


[PyQt] ANN: PyQwt-5.1.0 released

2008-06-01 Thread Gerard Vermeulen
What is PyQwt ( http://pyqwt.sourceforge.net ) ?

- it is a set of Python bindings for the Qwt C++ class library which
  extends the Qt framework with widgets for scientific and engineering
  applications.   It provides a 2-dimensional plotting widget and
  various widgets to display and control bounded or unbounded floating
  point values.

- it requires and extends PyQt, a set of Python bindings for Qt.

- it supports the use of PyQt, Qt, Qwt, and optionally NumPy or SciPy
  in a GUI Python application or in an interactive Python session.

- it runs on POSIX, Mac OS X and Windows platforms (practically any
  platform supported by Qt and Python).

- it plots fast: fairly good hardware allows a rate of 100,000
points/second. (PyQwt with Qt-3 is faster than with Qt-4).

- it is licensed under the GPL with an exception to allow dynamic
linking with non-free releases of Qt and PyQt. 


The most important new features of PyQwt-5.1.0 are:
- support for Qwt-5.1.0.
- support for PyQt-4.4.2 and SIP-4.7.6.
- support for Qt-4.4.
- the CartesianDemo.py, MaskedDataDemo.py, PickerDemo.py examples.

The most important bug fixes in PyQwt-5.1.0 are:
- fixed QwtPicker::stateMachine() to allow for subclassing of QwtPicker
in Python.

PyQwt-5.1.0 supports:
1. Python-2.5, or -2.4. 
2. PyQt-3.17.
3. PyQt-4.4, PyQt-4.3, or PyQt-4.2.
3  SIP-4.7, or SIP-4.6.
4. Qt-3.3, or Qt-3.2.
5. Qt-4.4, Qt-4.3, or Qt-4.2.
6. Qwt-5.1, or Qwt-5.0.
7. Recent versions of NumPy, numarray, and/or Numeric.


Enjoy -- Gerard Vermeulen
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Can't create a QImage?

2008-06-01 Thread Giovanni Bajo
On Sat, 2008-05-31 at 17:47 +0200, Piotr Antoniak wrote:
> 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:
> 
>  
> 
> >>> image = qt.QImage(qt.QSize(10,10), 4)
> >>> image.width()
> 0
> >>> image.height()
> 0
> >>> 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...

There has to be a problem with your PyQt installation, try a newer
version. This is my output:

>>> from PyQt4.Qt import *
>>> img = QImage(QSize(10,10), 4)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: argument 2 of QImage() has an invalid type
>>> img = QImage(QSize(10,10), QImage.Format_RGB32)
>>> img.width()
10

-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com


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


Re: [PyQt] webView & webPage

2008-06-01 Thread [EMAIL PROTECTED]
WOO  TNX!!!
I've searched for 2 weeks!
I have qt 4.4 and pyqt-dev-tools compiled for debian, in a DEB package.
Tell me if any one want this packages, I have a own ftp server to upload it.

Does any know if there's already an app like  qt-assistant created with
pyqt?
Because this is so similar to the app that I want to create, but I would
like to add some features.

Adonay





  Adonay Sanz Alsina

  K-DEMar GNU/Linux:  www.k-demar.org



Original Message:
-
From:  [EMAIL PROTECTED]
Date: Sat, 31 May 2008 11:57:07 +
To: [EMAIL PROTECTED], pyqt@riverbankcomputing.com
Subject: Re: [PyQt] webView & webPage


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


mail2web LIVE – Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE



___
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-06-01 Thread Pierre Raybaut

Darren Dale a écrit :

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.
  
I thought that it may be useful for people to keep this in mind just in 
case (one could have experienced a similar problem and have an idea on 
how to solve it, and then I would have eventually switch to matplotlib 
mailing-list).
I posted this message for PyQt users *information* only: that's why I 
mentioned that I've posted on the matplotlib mailing-list too (which was 
obviously the real "bug report").

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