[PyQt] PyQt API 2: equivalent of Null QVariant?

2010-12-21 Thread TP
Hello, I currently use the API 1, and use the isNull() method of QVariant to detect a Null QVariant. This is necessary to detect a NULL value in a database. It seems there is no equivalent in API2 of PyQt. None is used to model an invalid QVariant. But how to model a Null QVariant?

Re: [PyQt] Display of Japanese Characters on Mac

2010-12-21 Thread Yuya Nishihara
Hi, Ullrich Martini wrote: It should be u日本. you are right, with the 'u' I get not output at all instead of the garbled output. Hmm, unicode characters are somehow invisible? Regarding python: Could you please post whether you use 32 bit or 64 bit python? 64bit, preinstalled binary.

Re: [PyQt] PyQt API 2: equivalent of Null QVariant?

2010-12-21 Thread TP
Phil Thompson wrote: The short answer is that you can't. However... QVariant::isNull() typically delegates to the enclosed data's isNull() method (eg. QString::isNull()). So your example for API v1 will also work for API v2. It gets a bit more complicated if you are also using the

[PyQt] Number of rows after filter

2010-12-21 Thread F.A.Pinkse
Hi All I have a QtreeView with an QSortFilterProxyModel set as model When I fill the ProxyModel I can see all the data I supplied. So its working. Now I want to display somthing like 'x of y' after applying a filter. with x the number of remaining rows from the total y. So for short where

Re: [PyQt] PyQt API 2: equivalent of Null QVariant?

2010-12-21 Thread Phil Thompson
On Tue, 21 Dec 2010 21:06:11 +0100, TP paratribulati...@free.fr wrote: Phil Thompson wrote: The short answer is that you can't. However... QVariant::isNull() typically delegates to the enclosed data's isNull() method (eg. QString::isNull()). So your example for API v1 will also work for

Re: [PyQt] Question about labels with status message

2010-12-21 Thread Jason Tiller
Hi, Abhishek, :) On Fri, 17 Dec 2010, Abhishek wrote: Hi all,I have a general coding question as opposed to specific to pyqt. In a gui, if I want to have a status message box (a QLabel) which should display messages from all components of the gui, what is the best way to go about it? Should

Re: [PyQt] PyQt API 2: equivalent of Null QVariant?

2010-12-21 Thread TP
Phil Thompson wrote: API v1 will be supported until PyQt5 or Python v4. Is it contractual? Why Python v4? It seems to me that nobody knows when Python v4 will appear. Anyway, it seems to be a problem that API2 does not support NULL, even if it corresponds to side cases (as mine). Thanks,

Re: [PyQt] PyQt API 2: equivalent of Null QVariant?

2010-12-21 Thread Erik Janssens
you could just access sql through python instead of through qt, NULL would then correspond to None On Tue, 2010-12-21 at 23:52 +0100, TP wrote: Phil Thompson wrote: API v1 will be supported until PyQt5 or Python v4. Is it contractual? Why Python v4? It seems to me that nobody knows when

Re: [PyQt] PyQt API 2: equivalent of Null QVariant?

2010-12-21 Thread TP
Erik Janssens wrote: you could just access sql through python instead of through qt, NULL would then correspond to None Thanks. Yes, it is possible to use for example the sqlite3 module, but there are facilities related to the GUI, available when using Qt: QSqlTableModel,

Re: [PyQt] PyQt API 2: equivalent of Null QVariant?

2010-12-21 Thread Hans-Peter Jansen
On Tuesday 21 December 2010, 23:58:39 Erik Janssens wrote: you could just access sql through python instead of through qt, NULL would then correspond to None ...by the price of renouncing QtSql neck and crop. That's a high price to pay, isn't it? Sure, Camelot does this, but I really