Re: [PyQt] Processing signals from a called method while the method executes

2010-07-01 Thread Andreas Pakulat
On 01.07.10 21:35:44, alan moore wrote: > I've encountered this problem twice now in subtle ways, I think this > is at the root of my last question about the QWebView; I've included > sample code this time to illustrate. > > In the attached script, I have a widget class and a processor class. > Th

Re: [PyQt] Synchronous WebView.load()

2010-07-01 Thread alan moore
As I understand it, the webview doesn't actually load the page and update itself until the method call returns; at which point it loads the new page and updates the history. To illustrate the problem I'm having a little more clearly, I've attached a sample script. The script is supposed to co

[PyQt] Processing signals from a called method while the method executes

2010-07-01 Thread alan moore
I've encountered this problem twice now in subtle ways, I think this is at the root of my last question about the QWebView; I've included sample code this time to illustrate. In the attached script, I have a widget class and a processor class. The processor represents some kind of processing e

Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC

2010-07-01 Thread Demetrius Cassidy
Phil, It's not code specific to that class. It's due to the deep inheritance tree. You should be able to run my test code and get the same results. Basically to sum it up: PTCPSocket <- PIPDataGramSocket <- PIPSocket <- PSocket (ABC) PTCPSocket, PIPSocket and PSocket all define a virtual func

[PyQt] multiple inheritance and MappedType

2010-07-01 Thread Clinton Stimpson
Hi, I've got an existing library with python wrappers generated with a different tool, and I've successfully used MappedType to interface with that and I'm getting the interoperability I'm looking for. But now I want to use sip to wrap a class that derives from two classes, one is QObject, and

Re: [PyQt] signal twice emit

2010-07-01 Thread Phil Thompson
On Thu, 01 Jul 2010 19:50:14 +0200, Csaba Toth wrote: > Hi! > > last evening recompiled the program with PyQt 4.6.2 (it has Qt 4.5.3), > and today the problem gone, no one complained. > > Phil, what you think, is it a good idea to compile PyQt 4.6.2+Qt 4.6.3, > or PyQt 4.7.3+Qt 4.5.3? Or have a

Re: [PyQt] Synchronous WebView.load()

2010-07-01 Thread alanm
On Thursday 01 July 2010 2:13:47 pm alanm wrote: > I have an app with a QWebView, and I'm trying to implement a "reset" button > that will clear the history and return the user to the start page. > > The method looks like this: > > def reset_browser(self): > self.webview.load(self.startUrl) >

Re: [PyQt] Getting stuck in an infinite loop in QGraphicsPixmapItem::boundingRect()

2010-07-01 Thread dizou
I realized if I don't set the pixmaps on the QGraphicsPixmapItems, I don't have this problem. This only happens when they have a pixmap. -- View this message in context: http://old.nabble.com/Getting-stuck-in-an-infinite-loop-in-QGraphicsPixmapItem%3A%3AboundingRect%28%29-tp29047302p29049585.htm

Re: [PyQt] Getting stuck in an infinite loop in QGraphicsPixmapItem::boundingRect()

2010-07-01 Thread dizou
David Boddie-4 wrote: > > When you stop the program, do you get a Python Traceback? > > If so, what does it show? > > David > -- > David Boddie > Senior Technical Writer > Nokia, Qt > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://

[PyQt] Synchronous WebView.load()

2010-07-01 Thread alanm
I have an app with a QWebView, and I'm trying to implement a "reset" button that will clear the history and return the user to the start page. The method looks like this: def reset_browser(self): self.webview.load(self.startUrl) self.webview.history().clear() The problem with the method

Re: [PyQt] Getting stuck in an infinite loop in QGraphicsPixmapItem::boundingRect()

2010-07-01 Thread David Boddie
On Thu Jul 1 16:46:56 BST 2010, dizou wrote: > The QGraphicsScene contains a bunch of QGraphicsPixmapItems in it. The > QGraphicsView displays them on the screen. When I click a "Open" button, I > enter into the Open() function in my widget. When this happens, I go into > an infinite loop where py

[PyQt] problem with connection to mysql

2010-07-01 Thread Jean Carlos RodrĂ­guez
Hi I have a problem connecting to a server from Windows install mysql PyQt-Py2.6-gpl-4.7.3-2.exe tells me (with database support for MySQL, PostgreSQL, SQLite3 and ODBC) but I can not connect to mysql, which I do. Windows Vista, Xp , Seven Python 2.6.4

Re: [PyQt] signal twice emit

2010-07-01 Thread Csaba Toth
Hi! last evening recompiled the program with PyQt 4.6.2 (it has Qt 4.5.3), and today the problem gone, no one complained. Phil, what you think, is it a good idea to compile PyQt 4.6.2+Qt 4.6.3, or PyQt 4.7.3+Qt 4.5.3? Or have a better idea? thanks in advance, Csaba 2010.06.30. 21:28 keltezéss

[PyQt] QActions on a toolbar and mnemonics

2010-07-01 Thread alanm
I have a QToolBar created from a QMainWindow's addToolBar() method. I have created a number of QActions with mnemonics in the name and shortcut keys assigned by using the QKeySequence.mnemonic() method to extract the mnemonic from the QAction's name. The problem is that when I add the QActions

[PyQt] Getting stuck in an infinite loop with boundingRect()

2010-07-01 Thread dizou
I have a widget with a QTreeView, QGraphicsScene, and a QGraphicsView: MainWidget.py: class MainWidget(ControlWidget): def __init__(self, parent): ControlWidget.__init__(self, parent) self.tree = TreeArea(self) #TreeArea inherits QTreeView self.display = Disp

[PyQt] Signal number 10

2010-07-01 Thread Hugo Leveille
Hey there! New to this list and to PyQt in general. Sorry if this problem has been already discussed ( probably ) I am using Qt designer along with TextMatte and osx 10.5. At some point, when closing a pyqt app run from TextMatte, the app will close with the following error message Uncought

Re: [PyQt] adding signalling to QGraphicsItems

2010-07-01 Thread Christopher M. Nahler
On 01.07.2010 16:21, Phil Thompson wrote: On Thu, 01 Jul 2010 16:10:32 +0200, "Christopher M. Nahler" wrote: On 01.07.2010 12:29, Phil Thompson wrote: On Thu, 01 Jul 2010 11:58:01 +0200, "Christopher M. Nahler" wrote: I want to add signalling functionality to scene item

Re: [PyQt] SIP Bug: virtual function wrapped twice due to deep inheritance from base class and ABC

2010-07-01 Thread Phil Thompson
On Sat, 19 Jun 2010 10:27:55 -0700 (PDT), Demetrius Cassidy wrote: > Basically I have a Listen() function in a derived class, that is also in > the > base and ABC. For some reason sip ends up wrapping the same function twice > (it > has a body in the ABC), even though it's a virtual function in

Re: [PyQt] adding signalling to QGraphicsItems

2010-07-01 Thread Phil Thompson
On Thu, 01 Jul 2010 16:10:32 +0200, "Christopher M. Nahler" wrote: > On 01.07.2010 12:29, Phil Thompson wrote: >> On Thu, 01 Jul 2010 11:58:01 +0200, "Christopher M. Nahler" >> wrote: >> >>> I want to add signalling functionality to scene items. In my case they >>> are usually QGraphicsRectI

Re: [PyQt] adding signalling to QGraphicsItems

2010-07-01 Thread Christopher M. Nahler
On 01.07.2010 12:29, Phil Thompson wrote: On Thu, 01 Jul 2010 11:58:01 +0200, "Christopher M. Nahler" wrote: I want to add signalling functionality to scene items. In my case they are usually QGraphicsRectItems.. I thought I could do this with deriving from QGraphicsObject but then I loos

[PyQt] I want my GUI to change appearance based on what happens in a for-statement as it happens. Instead it changes after the whole for-statement ends.

2010-07-01 Thread Kalish, David Price
In my GUI I have a for-statement that opens a text file and changes the color of a QFrame depending on the first letter of each line in the file. The relevent part of the code is attached as a text file, and so is the sample text file I've been using. The raw_input lines were added so I could

Re: [PyQt] Strange error with latest PyQt4 snapshot

2010-07-01 Thread Phil Thompson
On Sun, 20 Jun 2010 13:25:27 +0200, detlev wrote: > Hi, > > I just upgraded to latest PyQt4 snapshot and got the following error while > executing this lines of code > > self.__index = self.__engine.indexWidget() > self.__index.installEventFilter(self) > > self.__engine is a QH

Re: [PyQt] comparing two QItemSelection always return False ?

2010-07-01 Thread Phil Thompson
On Wed, 30 Jun 2010 20:35:02 +0200, Zoltan Szalai wrote: > Hello, > > What's the proper way to compare two QItemSelection instances? It seems > that using the == operation always returns False. > Comparing their indexes() can do the job but it seems a bit redundant. > > The attached code tries

Re: [PyQt] adding signalling to QGraphicsItems

2010-07-01 Thread Phil Thompson
On Thu, 01 Jul 2010 11:58:01 +0200, "Christopher M. Nahler" wrote: > I want to add signalling functionality to scene items. In my case they > are usually QGraphicsRectItems.. > > I thought I could do this with deriving from QGraphicsObject but then I > loose all the funtionality for the rectang

[PyQt] adding signalling to QGraphicsItems

2010-07-01 Thread Christopher M. Nahler
I want to add signalling functionality to scene items. In my case they are usually QGraphicsRectItems.. I thought I could do this with deriving from QGraphicsObject but then I loose all the funtionality for the rectangle, handling pens and brushes, shapes etc. Isn't it easier to just derive

[PyQt] Cannot import Qtcore

2010-07-01 Thread makhamisa senekane
Hi I am having a slight problem with PyQt4 toolkit. Every time i try to import QtCore or QtGui, i get this error message: Traceback (most recent call last): File "", line 1, in from PyQt4 import QtCore SystemError: NULL result without error in PyObject_Call It used to work fine until last

[PyQt] adding signalling to QGraphicsItems

2010-07-01 Thread Christopher M. Nahler
I want to add signalling functionality to scene items. In my case they are usually QGraphicsRectItems.. I thought I could do this with deriving from QGraphicsObject but then I loose all the funtionality for the rectangle, handling pens and brushes, shapes etc. Isn't it easier to just derive

[PyQt] Select text in QMessageBox

2010-07-01 Thread Mads Ipsen
How do I make the text selectable (for mouse copy and paste) in a QMessageBox? On Linux, it works by default, but on windows, the text cannot be selected. Any clues? Best regards, Mads -- +--+ | Mads Ipsen, Scientific developer

Re: [PyQt] how to set up a timer to call a method after a d elay?

2010-07-01 Thread Phil Thompson
On Thu, 01 Jul 2010 01:37:00 -0700, Steve Castellotti wrote: > On Thu, 2010-07-01 at 09:09 +0100, Phil Thompson wrote: >> > I'm still getting this error: >> > >> > QObject::startTimer: QTimer can only be used with threads started with >> > QThread >> >> I think that is a misleading message

Re: [PyQt] how to set up a timer to call a method after a delay?

2010-07-01 Thread Steve Castellotti
On Thu, 2010-07-01 at 09:09 +0100, Phil Thompson wrote: > > I'm still getting this error: > > > > QObject::startTimer: QTimer can only be used with threads started with > > QThread > > I think that is a misleading message - you need to provide a test case. > > Because Qt sockets are handled

Re: [PyQt] how to set up a timer to call a method after a d elay?

2010-07-01 Thread Phil Thompson
On Wed, 30 Jun 2010 17:53:38 -0700, Steve Castellotti wrote: > On Wed, 2010-06-30 at 18:19 +0100, Phil Thompson wrote: >> > self.timer = QtCore.QTimer() >> > self.timer.connect(self.timer, QtCore.SIGNAL("timeout()"), >> > self.sendData) >> > self.timer.start(1000) # 1 second >> > >> > ...but