[PyQt] Question about Sort/Filter behaviour
Hans-Peter Jansen
hpj at urpla.net
Wed Dec 1 23:38:18 GMT 2010
On Wednesday 01 December 2010, 00:47:56 Hans-Peter Jansen wrote:
> On Tuesday 30 November 2010, 04:02:48 James Polk wrote:
> >
> > For example,...supposed I set
> > filterColumn to "Date"
> > filterSyntax to "Wildcard"
> > and finally, in filterPattern, I type 1/* (with no quotes)
> >
> > I would expect to get a view returned with with all the January
> > dates...but I get nothing...
> > If I remove the slash (/), leaving 1*, I get everything, or better
> > said I get the behaviour of regExp,....if you switch filterSyntax
> > to "regular expression", you'll get the same results...
>
> This is unfortunate: it appears, that Qt has issues with matching
> date/datetime columns.
>
> It relies on the fact, that the date column matching is always based
> on the iso format of date/time: e.g. something like
> 2007-01-03T14:26:00.
Here's how this issue could be worked around properly.
Does it work for you now, too?
Phil, it might be worth replacing the example with the attached one.
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basicsortfiltermodel.py
Type: application/x-python
Size: 10093 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101202/ae78d342/attachment.bin>
More information about the PyQt
mailing list