Re: [PyQt] Is the result of SIGNAL() a constant?

2008-01-08 Thread Phil Thompson
On Tuesday 08 January 2008, Aaron Digulla wrote: > Hello, > > >From the documentation, I got the impression that the result of SIGNAL() > > is more or less a constant. Is this code valid? > >signal = SIGNAL() >self.connect(w1, signal, self.w1Clicked) >self.connect(w2, signal, self.w2Cli

[PyQt] Is the result of SIGNAL() a constant?

2008-01-08 Thread Aaron Digulla
Hello, >From the documentation, I got the impression that the result of SIGNAL() is more or less a constant. Is this code valid? signal = SIGNAL() self.connect(w1, signal, self.w1Clicked) self.connect(w2, signal, self.w2Clicked) ie. can I predefine all signals in my app, save them somew

[PyQt] pykde4 using KConfig XT - tutorial

2008-01-08 Thread Peter Liedler
I am trying to autogenerate a configuration dialog with a KConfigSkeleton. I just can't get it working. Can you post me a sample, tutorial or something else on how to call a config dialog in pykde4? I tried it with a .kcfg file as described in the tutorials on kde.org, but there was no success. D

[PyQt] SIP newbie question (%MethodCode oddity)

2008-01-08 Thread Jim Crowell
Hi all, I'm fiddling with SIP 4.7.3 on XP for a non-Qt-related project. As a learning exercise I tried porting the Fraction example at to SIP 4. Got it working to a first approximation, but there's a bit that puzzles me: sipCpp doesn't always get defi

[PyQt] [PyKDE4] Text of menus not showing up

2008-01-08 Thread Adeodato Simó
Hello Simon. I'm starting to port my application (audio player) to PyKDE4. The bindings compiled fine, but after the first steps I encountered that the text in the menu bar and the menus themselves was not being displayed. If you could try to reproduce, that'd be nice. I attach two minimal progra

Re: [PyQt] signal-slot connect problem

2008-01-08 Thread Phil Thompson
On Tuesday 08 January 2008, Martin Höfling wrote: > Hi all, > > I am trying to create a filter Toolbar bar class, filtering a model. > > why does the following connect command in the loadModel Method not work?: > > class FilterToolBar(QToolBar): > def __init__(self): > super(FilterTool

[PyQt] signal-slot connect problem

2008-01-08 Thread Martin Höfling
Hi all, I am trying to create a filter Toolbar bar class, filtering a model. why does the following connect command in the loadModel Method not work?: class FilterToolBar(QToolBar): def __init__(self): super(FilterToolBar,self).__init__(QString("Filter")) self.expFilterCombo

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Aaron Digulla
Quoting Aaron Digulla <[EMAIL PROTECTED]>: Another wa would be to save all objects which pass through SIP in map (QObject -> Python wrapper), connect to the destroyed(QObject) signal and check the state when it is emitted. Does SIP notice when the python wrapper is destroyed? If not, it's probab

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Aaron Digulla
Quoting Hans-Peter Jansen <[EMAIL PROTECTED]>: First of all, happy new year, Phil & and PyQtnistas! Thanks, to you, too. :) The difference is that in C++ the effect of the bug is a memory leak, but in PyQt it is often a crash. This part is what bugs me, and surely caught every PyQt user in

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Hans-Peter Jansen
First of all, happy new year, Phil & and PyQtnistas! Am Dienstag, 8. Januar 2008 schrieb Phil Thompson: > > In C++ you should be managing the lifecycle of the model you create > (either by giving it a parent or by keeping a pointer to it and deleting > it when appropriate). The same applies in PyQ

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Brian Kelley
On Jan 8, 2008, at 7:12 AM, Aaron Digulla wrote: Quoting Phil Thompson <[EMAIL PROTECTED]>: I'm happy to consider ways to make this more obvious (even if it's just a better FAQ), but I'm not happy about departing from the Qt API and introducing inconsistencies in fundamental behaviour. Th

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Phil Thompson
On Tuesday 08 January 2008, Aaron Digulla wrote: > Quoting Phil Thompson <[EMAIL PROTECTED]>: > > I'm happy to consider ways to make this more obvious (even if it's just a > > better FAQ), but I'm not happy about departing from the Qt API and > > introducing inconsistencies in fundamental behaviour

[PyQt] 10.7: super and PyQt classes

2008-01-08 Thread Aaron Digulla
Hello, Please clarify the docs (http://www.riverbankcomputing.com/Docs/PyQt4/pyqt4ref.html#super-and-pyqt-classes): Does that mean super() can't / shouldn't / mustn't be used when deriving from PyQt classes? What is the fix? Maybe give an example what won't work and how to fix it or provi

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Aaron Digulla
Quoting Phil Thompson <[EMAIL PROTECTED]>: I'm happy to consider ways to make this more obvious (even if it's just a better FAQ), but I'm not happy about departing from the Qt API and introducing inconsistencies in fundamental behaviour. Then let me put it this way: If I wanted to care about w

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Phil Thompson
On Tuesday 08 January 2008, Aaron Digulla wrote: > Quoting Andreas Pakulat <[EMAIL PROTECTED]>: > >> I'm talking about preventing the python class which is used as the model > >> being garbage collected; it doesn't matter from which Qt class it is > >> derived. > >> > >> As it is, the class pointer

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Phil Thompson
On Tuesday 08 January 2008, Aaron Digulla wrote: > Quoting Aaron Digulla <[EMAIL PROTECTED]>: > >>> I'm talking about preventing the python class which is used as the > >>> model being garbage collected; it doesn't matter from which Qt class it > >>> is derived. > >>> > >>> As it is, the class poin

Re: [PyQt] problem using SIP on Windows Vista 64 bit

2008-01-08 Thread Phil Thompson
On Monday 07 January 2008, Quoc Tran wrote: > Hi, > > I am using PyQt on Vista 64 bit. I managed to successfully compile > Python2.5, Qt4.3.3, SIP4.7.3 and PyQt4.3.3 using MSVC2005. Everything works > great so far and now I'm trying to use SIP to create PyQt extensions and am > running into problem

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Aaron Digulla
Quoting Aaron Digulla <[EMAIL PROTECTED]>: I'm talking about preventing the python class which is used as the model being garbage collected; it doesn't matter from which Qt class it is derived. As it is, the class pointer is copied into the view class and then python frees the memory. That caus

Re: [PyQt] Bug in QTableView.setModel()

2008-01-08 Thread Aaron Digulla
Quoting Andreas Pakulat <[EMAIL PROTECTED]>: I'm talking about preventing the python class which is used as the model being garbage collected; it doesn't matter from which Qt class it is derived. As it is, the class pointer is copied into the view class and then python frees the memory. That ca