Re: [PyQt] Scroll QTableView beyond last column/row

2013-09-03 Thread Mark Mordeca
tToLeft() ? newOffset - oldOffset : oldOffset - newOffset; } else { d->horizontalHeader->setOffset(horizontalScrollBar()->value()); } Thanks for your help Paul, it is greatly appreciated. *From:* Paul Du Bois [mailto:dub...@doublefine.com] *Sent:* August-2

Re: [PyQt] Scroll QTableView beyond last column/row

2013-08-29 Thread Mark Mordeca
find a way to avoid this? Appreciate your help. *From:* Paul Du Bois [mailto:dub...@doublefine.com] *Sent:* August-28-13 4:34 PM *To:* Mark Mordeca *Cc:* pyqt@riverbankcomputing.com *Subject:* Re: [PyQt] Scroll QTableView beyond last column/row I do this: # somewhere in init

[PyQt] Scroll QTableView beyond last column/row

2013-08-28 Thread Mark Mordeca
Greetings, I have a simple QTableView connected to an QAbstractTableModel. For the purposes of my question, let’s assume that these are the most basic you can have in order to get a table with data in it. Default behaviour is that you can scroll the table so that the last column/row becomes

[PyQt] Paste entire column into QTableView from Excel

2013-05-13 Thread Mark Mordeca
Greetings, I am having an issue pasting into a QTableView from Excel when the user has copied by selecting an entire column in Excel, essentially putting every single row in the selected column, for the entire excel sheet, on the clipboard. The following is my paste code for QTableView: def pa

Re: [PyQt] returning SQL result as ordinary python string?

2012-05-03 Thread Mark Mordeca
while(query.next()): idString=str(query.value(0).toString()) passwordString=str(query.value(1).toString()) query.value() returns a QVariant, so you use .toString() to convert it to a QString, then use str to convert the QString to a python string. Hope this helps. *From:* pyqt

Re: [PyQt] PyQwt and PyQt 4.9

2012-05-01 Thread Mark Mordeca
This is disappointing. I was about to try this very thing myself. Does anyone know what is the latest version of PyQt/Qt that works with PyQwt 5.2? Thanks, Mark -Original Message- From: pyqt-boun...@riverbankcomputing.com [mailto:pyqt-boun...@riverbankcomputing.com] On Behalf Of William

[PyQt] Can't insert Nulls Using QSqlQuery.execBatch

2011-10-03 Thread Mark Mordeca
Greetings, Using PyQt, I am having a problem inserting Nulls into a MySql table using the execBatch() method of QSqlQuery. From the documentation, a null QVariant (i.e. QVariant(QVariant.Double)) represents a Null when inserting. When doing a regular query.exec_ it does actually insert Nulls, how