Re: [PyQt] Bug in QAction?

2011-04-09 Thread Vicent Mas
On 2011-04-08 Phil Thompson  said:

> On Thu, 7 Apr 2011 12:12:48 +0200, Vicent Mas  wrote:
> > Hi,
> > 
> > I'm trying PyQt-x11-gpl-snapshot-4.8.4-8641ecc135b3 on a debian testing
> > box
> > with Python2.7 and virtualenv-1.5.1. Running the attached script raises
> > the
> > following error:
> > 
> > (venv2.7)vmas@rachael:/tmp$ Traceback (most recent call last):
> >   File "test_qaction.py", line 9, in 
> >   
> > shortcut=QtGui.QKeySequence.New)
> > 
> > TypeError: keyword arguments are not supported
> > 
> > As far as I know the support of keyword arguments has not been dropped
> 
> so
> 
> > I
> > suppose it is a bug. Am I right or am I missing something?
> 
> Fixed in tonight's SIP snapshot.
> 
> Thanks,
> Phil

Hi,

I've just installed the new SIP snapshot and reinstalled the latest PyQt4 
snapshot so I can confirm that the problem has gone.

Great technical support, as usual.

Thanks a lot,

Vicent
::

Share what you know, learn what you don't



signature.asc
Description: This is a digitally signed message part.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Bug in QAction?

2011-04-08 Thread Phil Thompson
On Thu, 7 Apr 2011 12:12:48 +0200, Vicent Mas  wrote:
> Hi,
> 
> I'm trying PyQt-x11-gpl-snapshot-4.8.4-8641ecc135b3 on a debian testing
> box 
> with Python2.7 and virtualenv-1.5.1. Running the attached script raises
> the 
> following error:
> 
> (venv2.7)vmas@rachael:/tmp$ Traceback (most recent call last):
>   File "test_qaction.py", line 9, in 
> shortcut=QtGui.QKeySequence.New)
> TypeError: keyword arguments are not supported
> 
> As far as I know the support of keyword arguments has not been dropped
so
> I 
> suppose it is a bug. Am I right or am I missing something?

Fixed in tonight's SIP snapshot.

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


Re: [PyQt] Bug in QAction?

2011-04-07 Thread Hans-Peter Jansen
On Thursday 07 April 2011, 22:36:43 Vicent Mas wrote:
> 2011/4/7 Vicent Mas :
> > On 2011-04-07 "Hans-Peter Jansen"  said:
> >> On Thursday 07 April 2011, 12:12:48 Vicent Mas wrote:
> >> > Hi,
> >> >
> >> > I'm trying PyQt-x11-gpl-snapshot-4.8.4-8641ecc135b3 on a debian
> >> > testing box with Python2.7 and virtualenv-1.5.1. Running the
> >> > attached script raises the following error:
> >> >
> >> > (venv2.7)vmas@rachael:/tmp$ Traceback (most recent call last):
> >> >   File "test_qaction.py", line 9, in 
> >> >
> >> >     shortcut=QtGui.QKeySequence.New)
> >> >
> >> > TypeError: keyword arguments are not supported
> >> >
> >> > As far as I know the support of keyword arguments has not been
> >> > dropped so I suppose it is a bug. Am I right or am I missing
> >> > something?
> >>
> >> Did this worked in earlier versions? I don't use keyword arguments
> >> much, but according to the builtin help, QAction simply didn't
> >> define any
> >>
> >> [...]
> >
> > Hi,
> >
> > It works fine with PyQt4.8.3. The only documentation I know
> > regarding this is
> >
> > http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/keyword_
> >arguments.html
> >
> > although it is not specific to QAction.
> >
> > Vicent
>
> Oops! I forgot to mention this one:
>
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qt_propert
>ies.html

Vicent, thanks for the reminder, and yes, something is busted here:

from PyQt4 import QtGui
app = QtGui.QApplication([])
act = QtGui.QAction('&Save', None, shortcut=QtGui.QKeySequence.Save)

Traceback (most recent call last):
  File "action.py", line 4, in 
act = QtGui.QAction('&Save', None, shortcut=QtGui.QKeySequence.Save)
TypeError: keyword arguments are not supported

On the pride side, the pyqtConfigure() method works still:

from PyQt4 import QtGui
app = QtGui.QApplication([])
act = QtGui.QAction('&Save', None)
act.pyqtConfigure(shortcut=QtGui.QKeySequence.Save)

Pete

python: 2.6
sip: 4.12.2-snapshot-ec9807971e08
qt4: 4.7.1
pyqt4: snapshot-4.8.4-8641ecc135b3
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Bug in QAction?

2011-04-07 Thread Vicent Mas
2011/4/7 Vicent Mas :
> On 2011-04-07 "Hans-Peter Jansen"  said:
>
>> On Thursday 07 April 2011, 12:12:48 Vicent Mas wrote:
>> > Hi,
>> >
>> > I'm trying PyQt-x11-gpl-snapshot-4.8.4-8641ecc135b3 on a debian
>> > testing box with Python2.7 and virtualenv-1.5.1. Running the attached
>> > script raises the following error:
>> >
>> > (venv2.7)vmas@rachael:/tmp$ Traceback (most recent call last):
>> >   File "test_qaction.py", line 9, in 
>> >
>> >     shortcut=QtGui.QKeySequence.New)
>> >
>> > TypeError: keyword arguments are not supported
>> >
>> > As far as I know the support of keyword arguments has not been
>> > dropped so I suppose it is a bug. Am I right or am I missing
>> > something?
>>
>> Did this worked in earlier versions? I don't use keyword arguments much,
>> but according to the builtin help, QAction simply didn't define any
>>
>> [...]
>>

> Hi,
>
> It works fine with PyQt4.8.3. The only documentation I know regarding this is
>
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/keyword_arguments.html
>
> although it is not specific to QAction.
>
> Vicent
>

Oops! I forgot to mention this one:

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qt_properties.html

Vicent

-- 
Share what you know, learn what you don't.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Bug in QAction?

2011-04-07 Thread Vicent Mas
On 2011-04-07 "Hans-Peter Jansen"  said:

> On Thursday 07 April 2011, 12:12:48 Vicent Mas wrote:
> > Hi,
> > 
> > I'm trying PyQt-x11-gpl-snapshot-4.8.4-8641ecc135b3 on a debian
> > testing box with Python2.7 and virtualenv-1.5.1. Running the attached
> > script raises the following error:
> > 
> > (venv2.7)vmas@rachael:/tmp$ Traceback (most recent call last):
> >   File "test_qaction.py", line 9, in 
> >   
> > shortcut=QtGui.QKeySequence.New)
> > 
> > TypeError: keyword arguments are not supported
> > 
> > As far as I know the support of keyword arguments has not been
> > dropped so I suppose it is a bug. Am I right or am I missing
> > something?
> 
> Did this worked in earlier versions? I don't use keyword arguments much,
> but according to the builtin help, QAction simply didn't define any
> 
> (and neither provides the signature a shortcut argument):
> >>> help(QtGui.QAction)
> 
> class QAction(PyQt4.QtCore.QObject)
> 
>  |  QAction(QObject)
>  |  QAction(QString, QObject)
>  |  QAction(QIcon, QString, QObject)
> 
> in contrary to:
> >>> help(QtGui.QWidget)
> 
> class QWidget(PyQt4.QtCore.QObject, QPaintDevice)
> 
>  |  QWidget(QWidget parent=None, Qt.WindowFlags flags=0)
> 
> Pete
> ___
> PyQt mailing listPyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Hi,

It works fine with PyQt4.8.3. The only documentation I know regarding this is

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/keyword_arguments.html

although it is not specific to QAction.

Vicent

::

Share what you know, learn what you don't



signature.asc
Description: This is a digitally signed message part.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Bug in QAction?

2011-04-07 Thread Hans-Peter Jansen
On Thursday 07 April 2011, 12:12:48 Vicent Mas wrote:
> Hi,
>
> I'm trying PyQt-x11-gpl-snapshot-4.8.4-8641ecc135b3 on a debian
> testing box with Python2.7 and virtualenv-1.5.1. Running the attached
> script raises the following error:
>
> (venv2.7)vmas@rachael:/tmp$ Traceback (most recent call last):
>   File "test_qaction.py", line 9, in 
> shortcut=QtGui.QKeySequence.New)
> TypeError: keyword arguments are not supported
>
> As far as I know the support of keyword arguments has not been
> dropped so I suppose it is a bug. Am I right or am I missing
> something?

Did this worked in earlier versions? I don't use keyword arguments much, 
but according to the builtin help, QAction simply didn't define any 
(and neither provides the signature a shortcut argument):

>>> help(QtGui.QAction)

class QAction(PyQt4.QtCore.QObject)
 |  QAction(QObject)
 |  QAction(QString, QObject)
 |  QAction(QIcon, QString, QObject)

in contrary to:

>>> help(QtGui.QWidget)

class QWidget(PyQt4.QtCore.QObject, QPaintDevice)
 |  QWidget(QWidget parent=None, Qt.WindowFlags flags=0)


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


[PyQt] Bug in QAction?

2011-04-07 Thread Vicent Mas
Hi,

I'm trying PyQt-x11-gpl-snapshot-4.8.4-8641ecc135b3 on a debian testing box 
with Python2.7 and virtualenv-1.5.1. Running the attached script raises the 
following error:

(venv2.7)vmas@rachael:/tmp$ Traceback (most recent call last):
  File "test_qaction.py", line 9, in 
shortcut=QtGui.QKeySequence.New)
TypeError: keyword arguments are not supported

As far as I know the support of keyword arguments has not been dropped so I 
suppose it is a bug. Am I right or am I missing something?


Vicent
::

Share what you know, learn what you don't

# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui

if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
action = QtGui.QAction(
'Sample action', None, 
shortcut=QtGui.QKeySequence.New)
app.exec_()



signature.asc
Description: This is a digitally signed message part.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt