Re: [PyQt] [SOLVED]Syntax to access a blob column on sqlite

2010-03-29 Thread IloChab
2010/3/28 IloChab iloc...@gmail.com: I tried in this way: blobField = QtCore.QVariant ( QtCore.QByteArray ([1,2,3,]) ) query = QtSql.QSqlQuery() query.prepare(INSERT INTO blobTable (blobColumn) VALUES(?)) query.bindValue(0,(blobField,)); query.exec_(); ... and I got no error

[PyQt] Syntax to access a blob column on sqlite

2010-03-28 Thread IloChab
I'm using a sqlite db from PyQt4 APIs, but I do not know how to INSERT/UPDATE a blob column with it. I mean: - if I use python to directly access sqlite I just write: from sqlite3 import dbapi2 as sqlite con = sqlite.connect('myDB') cur = con.cursor() blobFiled =

Re: [PyQt] Syntax to access a blob column on sqlite

2010-03-28 Thread IloChab
I tried in this way: blobField = QtCore.QVariant ( QtCore.QByteArray ([1,2,3,]) ) query = QtSql.QSqlQuery() query.prepare(INSERT INTO blobTable (blobColumn) VALUES(?)) query.bindValue(0,(blobField,)); query.exec_(); ... and I got no error, but in the DB I find an empty field: (u'') Which is

[PyQt] QTableView doubleClicked and clicked events do not work together

2009-07-08 Thread IloChab
I'm using : Python 2.6 Qt 4.5.0 PyQt 4.4.4 on a Fedora 11 I'm trying to use both clicked and doubleClicked events on a QTableView. This is the code: QtGui.QTableView.__init__(self, wdg)

[PyQt] Problems with sqlite

2008-08-20 Thread IloChab
I wrote a little application that uses PyQt4's API to access a sqlite DB. I run the same application in different environments (Fedora 8 9, Mac OsX, Windows) and on the target systems I have slightly different packages versions F8F9 OsX W Python 2.5.1

[PyQt] sqlite 'Driver not loaded' problem with different PyQt4 versions

2008-06-16 Thread IloChab
My application uses PyQt4 to access a sqlite DB. Then I convert it with py2exe into a windows executable. I use always the same py2exe version (0.6) and after I build my exe, when I run it, with some PyQt4 versions I get the 'Driver not loaded' error trying to access my sqlite db. Through

[PyQt] How to get an event after an Enter key is pressed?

2008-06-05 Thread IloChab
I wrote an application where I display sql data on a QTableView+QSqlQueryModel read only table. The current version allows you to select via mouse a record on that table and then add it to an other one, pressing an add-button. I'd like to give an alternate way to do this: after record line is

[PyQt] [PyQt4] Wrong QtCore.QLibraryInfo.BinariesPath on Windows

2008-05-14 Thread IloChab
I have an application that uses QtCore.QLibraryInfo.BinariesPath() to locate Qt4 assistant and show a customized help. On linux I have no problem but on Windows I get a wrong translation. On windows I just installed : * qt-win-opensource-4.3.4-mingw.exe * PyQt-Py2.5-gpl-4.3.3-2.exe and I

Re: [PyQt] Dock widgets and window's lost of focus.

2008-04-03 Thread IloChab
2008/3/26, IloChab [EMAIL PROTECTED]: I designed a main window that contains 1 tableView and 3 dockWidgets. If I use it on top of other windows, it works fine. If I let it under other windows, when recall it on top, I find the 3 dockWidget gone (they automatically closed), and if I reopen

[PyQt] Dock widgets and window's lost of focus.

2008-03-26 Thread IloChab
I designed a main window that contains 1 tableView and 3 dockWidgets. If I use it on top of other windows, it works fine. If I let it under other windows, when recall it on top, I find the 3 dockWidget gone (they automatically closed), and if I reopen them manually (through a menu action) they

[PyQt] SVN plugin doesn't work in eric4 4.1.0

2008-03-04 Thread IloChab
I just installed eric4 4.1.0 over a previous 4.0.4 on wich svn plugin worked just fine. On the new version it doesn't run and in the plugin-info panel I find an error importing pysvn module. Do I have to install pysvn too? On the previous version I hadn't and so I rolled back. Any idea on how I

[PyQt] Question about model/view framework

2008-02-26 Thread IloChab
I'm using the couple QTableView+QSqlQueryModel. I was wondering if it's possible to extend the table with some columns not contained in the relation but computed on the fly from the application. If it's possible I'd like to know how, because I made some tests without any success. Thank you in

[PyQt] Driver not loaded. - error accessing sqlite DB from a py2exe binary

2007-10-14 Thread IloChab
I wrote an application that uses PyQt4 to access a sqlite DB. Now I'm trying to convert it using py2exe and I found some problems. The last one, that I'm not able to avoid, is that when I launch the application's binary on a PC (that contains only a Python 2.5 installation and no QT4) I get an

Re: [PyQt] Not sure how to use QSqlRelationalTableModel

2007-07-11 Thread IloChab
2007/7/10, Mark Summerfield [EMAIL PROTECTED]: On 2007-07-10, IloChab wrote: I'm trying to use QSqlRelationalTableModel to show records on a table that will grow at run-time. What I get is that it works fine for records that are already present in sql tables but it doesn't for new lines

[PyQt] Not sure how to use QSqlRelationalTableModel

2007-07-10 Thread IloChab
I'm trying to use QSqlRelationalTableModel to show records on a table that will grow at run-time. What I get is that it works fine for records that are already present in sql tables but it doesn't for new lines that I add at run-time using .setData method. I'll attach to this message the

[PyQt] Can't install PyQt4 on F7

2007-06-09 Thread IloChab
I' trying to install PyQt-x11-gpl-4.2 on F7 with: python 2.5 and: qt4-4.2.3-8.fc7 qt4-doc-4.2.3-8.fc7 qt4-x11-4.2.3-8.fc7 qt4-devel-4.2.3-8.fc7 sip-4.6 I have /usr/lib64/qt4/bin in my PATH and QMAKESPEC set.. When I do the command: # python configure.py I get this error: Determining the

[PyQt] How to use Model/View framework

2007-05-08 Thread IloChab
I'm new in Qt programming. I'm using Model/View framework to develop an editor for tree structures. It shows tree data on a QTreeView that I link with setModel() to a different QAbstractItemModel for each set of data read from different files. My problem is that on the first time that I call