Pierre Raybaut | 1 Jun 2008 09:43

Re: Bug - PyQt 4.4.2 and Matplotlib 0.91.2

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").
adonay@k-demar.org | 1 Jun 2008 11:49

Re: webView & webPage

WOOOOOO  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:  gwhite <at> bustedflush.org
Date: Sat, 31 May 2008 11:57:07 +0000
To: adonay <at> k-demar.org, pyqt <at> 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
(Continue reading)

Giovanni Bajo | 1 Jun 2008 13:58
Favicon
Gravatar

Re: Can't create a QImage?

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 "<stdin>", line 1, in <module>
(Continue reading)

Gerard Vermeulen | 1 Jun 2008 14:12
Picon

ANN: PyQwt-5.1.0 released

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
(Continue reading)

Phil Thompson | 1 Jun 2008 14:14

Re: QVariant and Python list

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

Matt | 2 Jun 2008 04:06
Picon

(sort of) beginner question on pyuic4

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
Igor Prischepoff | 2 Jun 2008 10:06
Picon

problem building PyQt-win-gpl-4.4.3-snapshot-20080601

Trying to build fresh snapshot with mingw compiler on windows.
here is my build cmd file (c:\tmp\ is temporary directory where sources is
unpacked):

 set
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Qt\4.4.0\bin
;C:\MinGW\bin
 cd C:\tmp\sip-4.7.7-snapshot-20080530 
 C:/Python25/python configure.py -p win32-g++
 mingw32-make
 mingw32-make install
 cd ..\
 cd c:\tmp\PyQt-win-gpl-4.4.3-snapshot-20080601
 rem
 rem Next command is failed to complete ok.
 rem
 C:/Python25/python configure.py -w
 mingw32-make
 mingw32-make install

here is error :

------------------------
C:\tmp\PyQt-win-gpl-4.4.3-snapshot-20080601>c:\python25\python configure.py
-w
Determining the layout of your Qt installation...
C:\Qt\4.4.0\bin\qmake.exe -o qtdirs.mk qtdirs.pro
trying to compile release\qtdirs.exe
mingw32-make -f qtdirs.mk release
mingw32-make -f qtdirs.mk.Release
(Continue reading)

Adam Tenderholt | 2 Jun 2008 20:14
Picon

Re: (sort of) beginner question on pyuic4

Hi Matt,

The approach I usually take is outlined in the PyQt4 documentation:

http://riverbankcomputing.com/static/Docs/PyQt4/pyqt4ref.html#using-qt-designer

Specifically, I like the third approach because creating a subclass
makes the most sense to me, and this allows me to use the code
generated by pyuic4 intact.

Hope this helps,

Adam

On Sun, Jun 1, 2008 at 7:06 PM, Matt <matt-lists <at> comnet.net.nz> wrote:
> 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
(Continue reading)

David Boddie | 2 Jun 2008 21:19

Re: problem creating QApplication with argb visual

On Friday 30 May 2008 20:50, Lev Shamardin wrote:

> Could you please test again with the following snippet and commenting out
> line #132 from the paste (setting the self-destruction alarm):

[...]

> If it draws a window without any complaints on your system this seems to be
> a PyQt bug :(

I just get this:

screen: 0
eventBase: 0 errorBase: 136
nvi: 1
visual = 0x08265398, colormap = 0x00e00001
ext_data None visualid 57 c_class 4 red_mask 16711680 green_mask 65280 
blue_mask 255 bits_per_rgb 8 map_entries 256
Found ARGB visual, starting app...
Starting

And no window appears. :-/

> Well, this code is a straightforward translation of sources from 
> svn://labs.trolltech.com/svn/graphics/dojo/argb so everything seems to be
> fine from the Xlib side. Either I've done something wrong with types
> conversions or this is a bug.

Well, the Dojo example works for me, so maybe there's something a little
different going on with the Python version.
(Continue reading)

Kovid Goyal | 3 Jun 2008 00:06
Favicon
Gravatar

Re: pyuic4 doesn't handle qlistwidgets

Well, I found the time to generate a simple test case (using today's snapshot 
of PyQt4). The .ui file is attached. Running pyuic4 on it produces the  
erroneous code. In particular, the icon for the list widget is a local 
variable initialized in the setupUI function, but used in the retranslateUI 
function. Thus when retranslateUI is called it raises an exception.

Hope that clears it up for you.

Kovid.

On Saturday 24 May 2008 12:42:18 Andreas Pakulat wrote:
>
> I hope you don't expect anybody to read through all that code to find
> the actual problem ;) I suggest to create a much smaller sample, for
> example just having a single QListWidget with just one item in it that
> has a pixmap set.
>
> Andreas

--

-- 
_____________________________________

Kovid Goyal  MC 452-48
California Institute of Technology
1200 E California Blvd
Pasadena, CA 91125

cell  : +01 626 390 8699
office: +01 626 395 6595 (449 Lauritsen)
email : kovid <at> kovidgoyal.net
(Continue reading)


Gmane