Re: [PyQt] Drag-and-drop editing in QListWidget or QListView

2011-06-07 Thread Nathan Weston
On 06/02/2011 07:42 PM, David Boddie wrote: The draganddrop/puzzle example provided with PyQt uses a QListWidget to display a collection of puzzle pieces that can be dropped inside or outside the list, though it's not exactly the most user friendly interface you could imagine. The itemviews/pu

Re: [PyQt] QDateEdit is ignoring the sip API level 2

2011-06-07 Thread Linos
El 07/06/11 13:07, Phil Thompson escribió: On Tue, 7 Jun 2011 11:46:08 +0100, Daniele Esposti wrote: Well, datetime package doesn't support operations with QDate instances, for example QDateEdit().date() + datetime.timedelta(days=1) raises a TypeError. Just use... QDateEdit().date().toPyDate(

Re: [PyQt] QDateEdit is ignoring the sip API level 2

2011-06-07 Thread Phil Thompson
On Tue, 7 Jun 2011 11:46:08 +0100, Daniele Esposti wrote: > Well, datetime package doesn't support operations with QDate > instances, for example QDateEdit().date() + datetime.timedelta(days=1) > raises a TypeError. Just use... QDateEdit().date().toPyDate() + datetime.timedelta() > IMHO it's mo

Re: [PyQt] QDateEdit is ignoring the sip API level 2

2011-06-07 Thread Daniele Esposti
Well, datetime package doesn't support operations with QDate instances, for example QDateEdit().date() + datetime.timedelta(days=1) raises a TypeError. IMHO it's more clear to return a datetime instance instead a Qt one, like the QLineEdit.tex() method returns a unicode string instead of a QString

Re: [PyQt] QDateEdit is ignoring the sip API level 2

2011-06-07 Thread Phil Thompson
On Tue, 7 Jun 2011 10:55:46 +0100, Daniele Esposti wrote: > This simple example raise an AssertionError because the type of the > value returned by the QDateEdit.date() property is a QDate instance > even the sip API level for QDate is set to 2. > > Here the example which triggers the problem: >

[PyQt] QDateEdit is ignoring the sip API level 2

2011-06-07 Thread Daniele Esposti
This simple example raise an AssertionError because the type of the value returned by the QDateEdit.date() property is a QDate instance even the sip API level for QDate is set to 2. Here the example which triggers the problem: #!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import