Re: [PyQt] Storing QString/Unicode in Sqlite Database

2011-11-09 Thread Tayfun Kayhan
Thank you, the first one is working well. I tried setting API V2 but it gave an 
error which says that it has been already set to V1. I'll try fixing this, as 
well.



From: Andrei Kopats 
To: Tayfun Kayhan 
Cc: "pyqt@riverbankcomputing.com" 
Sent: Wednesday, November 9, 2011 6:38 AM
Subject: Re: [PyQt] Storing QString/Unicode in Sqlite Database


Hi

At first, you should probably use something like 
  unicode(some_lineEdit.text(), 'utf8'), if you want to convert string to 
unicode.
At second, for me all unicode conversion problems disappeared after I started 
using QString API v2. In this case, PyQt methods always return you unicode 
instead of QStrings
http://www.riverbankcomputing.com/static/Docs/PyQt4/html/incompatible_apis.html

Andrei


On Wed, Nov 9, 2011 at 1:20 AM, Tayfun Kayhan  wrote:

Hi all, I wanna get texts from some QLineEdits' and QComboBoxes and store them 
in Sqlite DB. But I keep gettin the following error, i also tried using 
following commands that did not worked : 
>
>
>self.info = some_lineEdit.text()
>self.info = str(u"%s" % some_lineEdit.text()) 
>self.info = some_lineEdit.text().toUtf8() 
>self.info = _fromUtf8(some_lineEdit.text()) 
>
>
>
>
>sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a 
>text_factory that can interpret 8-bit bytestrings (like text_factory = str). 
>It is highly recommended that you instead just switch your application to 
>Unicode strings.
>
>
>Everything works fine when i don't enter unicode strings,  so problem is 
>exactly the unicode. Any help is appreciated. Thanks.
>___
>PyQt mailing list    PyQt@riverbankcomputing.com
>http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] libpng warning: Interlace handling should be turned on when using png_read_image

2011-11-09 Thread Timothy W. Grove
Since updating from PyQt4.8.5 to PyQt4.5.6-1 using the 
PyQt-Py3.2-x86-gpl-4.8.6-1.exe 
 
Windows 32 bit installer on Windows7, I'm getting the following warnings:


   libpng warning: Interlace handling should be turned on when using
   png_read_image
   get_buffer() failed (stride changed)


There don't appear to be any problems in running my program, so I'm just 
ignoring it for now, but it is annoying. Anyone have any ideas about 
this or how to stop the warnings?


Best regards,
Tim

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

Re: [PyQt] can SIP 3.3 and PyQt 3.3, built with Python 2.7.1 ?

2011-11-09 Thread Vivek Narvekar
Hello Phil,

I was trying to build SIP 3.3 and PyQt 3.3, with Python 2.7.1 and was able to 
build SIP successfully.
Then, I tried building PyQt, where, the first module ie qt module got build 
successfully.
but there was a linking error, while building qtgl module as follows

sipqtglQGLContext.obj : error LNK2019: unresolved external symbol "private: stat
ic class QGLContext * QGLContext::currentCtx" (?currentCtx@QGLContext@@0PEAV1@EA
) referenced in function "public: static class QGLContext const * __cdecl QGLCon
text::currentContext(void)" (?currentContext@QGLContext@@SAPEBV1@XZ)
r:\bld\release\python\win64\Lib\site-packages\libqtglc.pyd : fatal error LNK1120
: 1 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"R:\imports\qt\qt3\bin\nmake.exe"' : return code '0x
2'
Stop.


I checked out qgl.h and found that QGLContext had following definition 

class QM_EXPORT_OPENGL QGLContext : public QGL
{
public:
// some member functions
static const QGLContext*currentContext();

protected:
// some member functions

private:
// some member functions
static QGLContext*  currentCtx;
};

What could be the possible reason for this ?

Thanks a lot for helping
Regards
Vivek



-Original Message-
From: Vivek Narvekar 
Sent: 08 November 2011 16:43
To: 'Phil Thompson'
Subject: RE: [PyQt] can SIP 3.3 and PyQt 3.3, built with Python 2.7.1 ?

Thanks a lot Phil.

-Original Message-
From: Phil Thompson [mailto:p...@riverbankcomputing.com] 
Sent: 08 November 2011 14:42
To: Vivek Narvekar
Cc: pyqt@riverbankcomputing.com
Subject: Re: [PyQt] can SIP 3.3 and PyQt 3.3, built with Python 2.7.1 ?

On Mon, 7 Nov 2011 21:53:49 -0800, "Vivek Narvekar"
 wrote:
> Hello,
> 
>  
> 
> I wanted to know if  SIP 3.3 and PyQt 3.3, can be built with Python
> 2.7.1 ?
> 
> are they compatible ?

Probably.

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