On Sat, Jan 28, 2006 at 08:18:25PM +0100, Gerard Vermeulen wrote:
[ .. ]
I mostly dislike the packing scheme of PyQt4, but I see where it's
coming
from, and as long as I'm allowed to use the from QtCore import *
without
polluting the global namespace, it's still good. Adding
Jesper Anderson [EMAIL PROTECTED] wrote:
and when you want to avoid typing pyqtSignature:
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignature as signature
Sure, or more simply:
signature = pyqtSignature
--
Giovanni Bajo
___
Gerard Vermeulen [EMAIL PROTECTED] wrote:
I understand that you like to take an unrecommended shortcut and
pollute the global namespace (Q-, q-prefix or not), but it is no
reason to make life harder for people who don't.
The Q prefix *is* a namespace. It's the way namespaces have always
Patrick K. O'Brien [EMAIL PROTECTED] wrote:
If we're going to use other large projects as examples then surely
wxPython is a better one. They spent the past year or two moving
from this:
from wx import *
button = wxButton(...)
[...]
to:
import wx
button =
Giovanni Bajo wrote:
Patrick K. O'Brien [EMAIL PROTECTED] wrote:
If we're going to use other large projects as examples then surely
wxPython is a better one. They spent the past year or two moving
from this:
from wx import *
button = wxButton(...)
[...]
to:
import wx
Patrick K. O'Brien [EMAIL PROTECTED] wrote:
If we're going to use other large projects as examples then surely
wxPython is a better one. They spent the past year or two moving
from this:
from wx import *
button = wxButton(...)
[...]
to:
import wx
button =
On Friday 27 January 2006 11:45 pm, Andreas Pakulat wrote:
On 27.01.06 22:46:29, Phil Thompson wrote:
On Friday 27 January 2006 8:10 pm, Patrick K. O'Brien wrote:
Phil Thompson wrote:
Tonight's PyQt4 snapshot implements Torsten's suggestion for using a
decorator to control which
On Saturday 28 January 2006 12:31 am, Giovanni Bajo wrote:
Phil Thompson [EMAIL PROTECTED] wrote:
The QtCore.signature() decorator takes a single argument which is, in
effect, the C++ signature of the method which tells the auto-connect
code which signal to connect. For example...
Phil Thompson [EMAIL PROTECTED] wrote:
The QtCore.signature() decorator takes a single argument which is,
in effect, the C++ signature of the method which tells the
auto-connect
code which signal to connect. For example...
@QtCore.signature(on_spinbox_valueChanged(int))
def
On 28.01.06 12:29:13, Giovanni Bajo wrote:
Phil Thompson [EMAIL PROTECTED] wrote:
The QtCore.signature() decorator takes a single argument which is,
in effect, the C++ signature of the method which tells the
auto-connect
code which signal to connect. For example...
On Saturday 28 January 2006 11:29 am, Giovanni Bajo wrote:
Phil Thompson [EMAIL PROTECTED] wrote:
The QtCore.signature() decorator takes a single argument which is,
in effect, the C++ signature of the method which tells the
auto-connect
code which signal to connect. For example...
On Sat, 28 Jan 2006 11:57:00 +
Phil Thompson [EMAIL PROTECTED] wrote:
On Saturday 28 January 2006 11:29 am, Giovanni Bajo wrote:
Phil Thompson [EMAIL PROTECTED] wrote:
The QtCore.signature() decorator takes a single argument which is,
in effect, the C++ signature of the method which
Jim Bublitz [EMAIL PROTECTED] wrote:
I don't believe Phil is imposing anything as far as coding style beyond
what
Python already requires with methods/functions imported from modules.
'signature' has to be part of the QtCore module or some other module. The
alternative to polluting the QtCore
Phil Thompson [EMAIL PROTECTED] wrote:
You can put it within the QtCore namespace, but please consider that many
people *will* use from QtCore import *, as it's the default way to make
the code similar to the C++ counterpart. If Trolltech added a
signature()
function, people would complain.
Andreas Pakulat [EMAIL PROTECTED] wrote:
A decorator is just a function and needs to reside in a namespace.
While I could put the signature() function in the global namespace,
that would be dumb.
You can put it within the QtCore namespace, but please consider that many
people *will* use
On 28.01.06 16:35:35, Giovanni Bajo wrote:
Andreas Pakulat [EMAIL PROTECTED] wrote:
A decorator is just a function and needs to reside in a namespace.
While I could put the signature() function in the global namespace,
that would be dumb.
You can put it within the QtCore namespace,
On Sat, 28 Jan 2006 17:59:56 +0100
Andreas Pakulat [EMAIL PROTECTED] wrote:
[ .. ]
I mostly dislike the packing scheme of PyQt4, but I see where it's coming
from, and as long as I'm allowed to use the from QtCore import * without
polluting the global namespace, it's still good. Adding
Gerard Vermeulen [EMAIL PROTECTED] wrote:
from PyQt4.QtCore import *
from PyQt4.QtCore import signature as pyqtSignature
import signature from signature
Not a solution, you still have signature in the global namespace.
I understand that you like to take an unrecommended shortcut and
On Sun, 29 Jan 2006 03:18:35 +0100
Giovanni Bajo [EMAIL PROTECTED] wrote:
Gerard Vermeulen [EMAIL PROTECTED] wrote:
from PyQt4.QtCore import *
from PyQt4.QtCore import signature as pyqtSignature
import signature from signature
Not a solution, you still have signature in the global
Tonight's PyQt4 snapshot implements Torsten's suggestion for using a decorator
to control which signal/slot connections are made when pyuic4 auto-connects.
The problem is best demonstrated by QSpinBox which emits valueChanged(QString)
and valueChanged(int). Defining an auto-connect method
Phil Thompson wrote:
Tonight's PyQt4 snapshot implements Torsten's suggestion for using a
decorator
to control which signal/slot connections are made when pyuic4 auto-connects.
The problem is best demonstrated by QSpinBox which emits
valueChanged(QString)
and valueChanged(int).
On Friday 27 January 2006 8:10 pm, Patrick K. O'Brien wrote:
Phil Thompson wrote:
Tonight's PyQt4 snapshot implements Torsten's suggestion for using a
decorator to control which signal/slot connections are made when pyuic4
auto-connects.
The problem is best demonstrated by QSpinBox
Cts 28 Oca 2006 00:46 tarihinde, Phil Thompson şunları yazmıştı:
On Friday 27 January 2006 8:10 pm, Patrick K. O'Brien wrote:
Phil Thompson wrote:
Tonight's PyQt4 snapshot implements Torsten's suggestion for using a
decorator to control which signal/slot connections are made when pyuic4
On 27.01.06 22:46:29, Phil Thompson wrote:
On Friday 27 January 2006 8:10 pm, Patrick K. O'Brien wrote:
Phil Thompson wrote:
Tonight's PyQt4 snapshot implements Torsten's suggestion for using a
decorator to control which signal/slot connections are made when pyuic4
auto-connects.
Andreas Pakulat wrote:
On 27.01.06 22:46:29, Phil Thompson wrote:
On Friday 27 January 2006 8:10 pm, Patrick K. O'Brien wrote:
Phil Thompson wrote:
Tonight's PyQt4 snapshot implements Torsten's suggestion for using a
decorator to control which signal/slot connections are made when pyuic4
Patrick K. O'Brien wrote:
Andreas Pakulat wrote:
then the longer version would IMHO be better as you can directly see
which slot is meant.
Anything longer than necessary is redundant, imo.
BTW: Will this also solve issues like the clicked()-signal from
QAbstractButton? So I could do
Phil Thompson [EMAIL PROTECTED] wrote:
The QtCore.signature() decorator takes a single argument which is, in
effect, the C++ signature of the method which tells the auto-connect
code which signal to connect. For example...
@QtCore.signature(on_spinbox_valueChanged(int))
def
On Friday 27 January 2006 16:31, Giovanni Bajo wrote:
Phil Thompson [EMAIL PROTECTED] wrote:
The QtCore.signature() decorator takes a single argument which is, in
effect, the C++ signature of the method which tells the auto-connect
code which signal to connect. For example...
28 matches
Mail list logo