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
“empty space” in the TableView. I have been unsuccessful in trying to find a way and hoped that someone here had a way to do this or a suggestion as to how. Thank you, Mark ___ PyQt mailing listPyQt@riverbankcomputing.com http

[PyQt] Paste entire column into QTableView from Excel

2013-05-13 Thread Mark Mordeca
Or should I just throw up an error when the size of the string on the clipboard is some arbitrarily large length? Any help would be appreciated. Thanks, Mark ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] A good PyQt “Primer”?

2013-01-11 Thread Mark Summerfield
ver, I have other book commitments at the moment, so do not know when (or even if) I will be able to do a new edition. It is possible to port most of the book's examples to PySide already. See: http://www.qtrac.eu/pyqtbook.html#pyside [snip] -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu

Re: [PyQt] A good PyQt “Primer”?

2013-01-11 Thread Mark Summerfield
šãñ wrote: > >> > >>> I want this book but I don't have cash to buy it. > >>> > >>> > >>> On Tue, Dec 11, 2012 at 4:30 PM, Tony Lynch wrote: > >>> > >>>> We have this book and have found it to be an exce

Re: [PyQt] A good PyQt “Primer”?

2012-12-11 Thread Mark Summerfield
nch wrote: > > > >> We have this book and have found it to be an excellent guide, > >> > >> Tony > >> > >> > -Original Message- > >> > From: pyqt-boun...@riverbankcomputing.com [mailto:pyqt- > >> > boun...@riverbank

Re: [PyQt] A good PyQt “Primer”?

2012-12-11 Thread Mark Summerfield
Thank > you.- P.M. Although my "Rapid GUI Programming with Python and Qt" is Python 2-based, the differences with Python 3 aren't great and I provide Python 3 versions of the examples. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python,

Re: [PyQt] problem running pyqt on xubuntu

2012-10-21 Thread Mark Summerfield
Hi Baz, On Sun, 21 Oct 2012 00:44:58 +0100 Baz Walter wrote: > On 20/10/12 08:11, Mark Summerfield wrote: > > Hi, > > > > I have built local versions of Qt 4.8.3, Python, SIP, and PyQt on an > > Xubuntu machine which has Qt 4.8.1 as its system Qt: > > > >

Re: [PyQt] problem running pyqt on xubuntu

2012-10-20 Thread Mark Summerfield
On Sat, 20 Oct 2012 03:21:51 -0400 Scott Kitterman wrote: > On Saturday, October 20, 2012 08:11:29 AM Mark Summerfield wrote: > > I have built local versions of Qt 4.8.3, Python, SIP, and PyQt on an > > Xubuntu machine which has Qt 4.8.1 as its system Qt: > > ... >

[PyQt] problem running pyqt on xubuntu

2012-10-20 Thread Mark Summerfield
(version 0x40803) Aborted (core dumped) So clearly, despite trying to build using my local Qt, PyQt seems to be looking at the system Qt. Is there a solution for this? Thanks! -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Progr

[PyQt] PyQt on BeagleBone

2012-07-25 Thread Mark
ve a BeagleBone to use for this purpose if it helps. And a PC that can be used remotely to accomplish this. Thanks for any pointers to people or technical resources I've missed. I can be contacted on this list, or off-list by phone (in the USA): two too f0ur siks thr3e sics f!ve 0ne thr3e

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

[PyQt] Menu icons missing in Xfce

2011-12-07 Thread Mark Summerfield
anyone know the fix for this? Thanks! -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming" - ISBN 0321635906 http://www.qtrac.eu/aqpbook.html ___ Py

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

2011-10-03 Thread Mark Mordeca
would be greatly appreciated. Thank you. Mark ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] vertical alignment of richtext in a table view

2010-12-19 Thread Mark Summerfield
Hi Wolfgang, On Sat, 18 Dec 2010 18:56:36 +0100 Wolfgang Rohdewald wrote: > On Dienstag 07 September 2010, Mark Summerfield wrote: > > > > The offset you need might be made up of the > > > > option.decorationSize's width; not sure

Re: [PyQt] How to destroy SIGNAL

2010-11-16 Thread Mark Summerfield
://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html#blockSignals And if you really want to delete a signal use QObject.disconnect(): http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html#disconnect -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++,

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-07 Thread Mark Summerfield
On Tue, 7 Sep 2010 12:56:59 +0200 Wolfgang Rohdewald wrote: > On Dienstag 07 September 2010, Mark Summerfield wrote: > > I should have mentioned before that it is better to inherit > > from QStyledItemDelegate rather than QItemDelegate. I'd try > > that first & see

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-06 Thread Mark Summerfield
On Tue, 7 Sep 2010 01:37:45 +0200 Wolfgang Rohdewald wrote: > On Montag 06 September 2010, Mark Summerfield wrote: > > I'm tending to use a differnt approach for rich text delegates > > nowadays. Instead of using a QTextDocument, I store a > > class-level QLabel, some

Re: [PyQt] vertical alignment of richtext in a table view

2010-09-06 Thread Mark Summerfield
Hi Wolfgang, On Sun, 5 Sep 2010 10:55:04 +0200 Wolfgang Rohdewald wrote: > Hi, > > in Mark Summerfields book "Rapid GUI programming with Python > and QT", there is an example on page 485 with a table column > having a delegate that displays richtext. In the book, > t

Re: [PyQt] setCursor does not seem to work as expected in graphicsScene/View

2010-08-25 Thread Mark Summerfield
a cursor preference so use my parent's cursor over me". > > Chris > > On 25.08.2010 10:30, Mark Summerfield wrote: > > On Wed, 25 Aug 2010 10:16:08 +0200 > > "Christopher M. Nahler" wrote: > > > >> I have done more tests and fou

Re: [PyQt] setCursor does not seem to work as expected in graphicsScene/View

2010-08-25 Thread Mark Summerfield
orking in. One simple "cheat" is to create a QGraphicsItem that is the same size as the scene and give it a big negative zValue so that it is always at the back and to change the icon on that item... Haven't tried this though. [snip] -- Mark Summerfield, Qtrac Ltd, www.q

Re: [PyQt] setCursor does not seem to work as expected in graphicsScene/View

2010-08-24 Thread Mark Summerfield
nge, but it doesn't work as I expected, and I don't have time to look into it further:-( [snip] -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming" - ISBN 0321635906 http://www.qtrac.eu/

Re: [PyQt] Trouble implementing a TableView model

2010-08-03 Thread Mark Summerfield
ive the model a parent.) BTW You might be able to avoid a proxy altogether since you're using standard items: look up QStandardItemModel.sortRole() & QStandardItemModel.setSortRole(). [snip] -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consu

[PyQt] Book: Advanced Qt Programming [C++/Qt]

2010-07-21 Thread Mark Summerfield
or a first book on Qt. I believe that this book will be helpful and useful to PyQt4 programmers who have a basic familiarity with C++ since most of the Qt techniques shown apply equally to C++ and PyQt4. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and c

Re: [PyQt] Rapid GUI Programming with Python and Qt

2010-07-20 Thread Mark Summerfield
kage for Mac. But > there is no Windows installer for the moment... > > I'm dreaming if a Mac package for PyQt... You mean a binary package I guess... that's one for Phil:-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++

Re: [PyQt] Rapid GUI Programming with Python and Qt

2010-07-19 Thread Mark Summerfield
Hi Sathishkumar, On Tue, 20 Jul 2010 10:33:34 +0530 Sathishkumar Duraisamy wrote: > Hi Mark Summerfield, > > I am fan of your book "Rapid GUI Programming with Python and Qt". Its > pleasure to have new edition. But two year is little long I know! But it takes a long t

Re: [PyQt] Rapid GUI Programming with Python and Qt

2010-07-19 Thread Mark Summerfield
also where the links to the Python 3 examples are located.) On a personal note, last week I finished converting all my own Python programs to Python 3.1 using the 2to3 tool and then manually converting str % usage to str.format(). This includes some PyQt GUI programs that I use every day:-) --

Re: [PyQt] best practices for MDI app

2010-07-15 Thread Mark Summerfield
this central main window doesn't have any central > widget at all. is this ok? [snip] It will probably work but I would consider it to be poor practice. Personally I'd create a custom QWidget subclass with exactly the desired behaviour rather than abuse a standard Qt widget:-) -- Ma

Re: [PyQt] best practices for MDI app

2010-07-14 Thread Mark Summerfield
purpose. If you need to show a specific number of images (2, 3, 4) then a horizontal splitter might suffice (or two horizontal splitters laid out one above the other). -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Programming

Re: [PyQt] best practices for MDI app

2010-07-14 Thread Mark Summerfield
dows visible and want to be fashionable then you can either use SDI (multiple top-level main windows -- which duplicate their menus and toolbars etc. of course) or use splitters. PS When you "close" a QDialog by default it is hidden not deleted. -- Mark Summerfield, Qtrac Ltd, www.qtrac.

Re: [PyQt] ProgressBar - Activity Mode

2010-07-14 Thread Mark Summerfield
ulse > > i.e. show activity by a block moving back and forth within the progress > area. > > Is there a quick way to do it? > Some code snippet to grab? > > What are possible alternatives for this kind of task? Just set the minimum and maximum to 0 and you'll get

Re: [PyQt] adding context menu to graphics item

2010-07-08 Thread Mark Summerfield
Since you're using Python 3.1 you can replace all your super() calls that look like this: super(MyView, self).__init__(parent) with ones that look like this: super().__init__(parent) since Python 3 is a bit smarter than Python 2:-) -- Mark Summerfield, Qtrac Ltd, www.q

Re: [PyQt] QTranslator and QFileDialog problems

2010-06-25 Thread Mark Summerfield
native file dialog where one is available. As for the English vs. German Qt will respect the machine's locale unless you override it as you're doing here. So maybe you don't have the qt_de.qm file on your XP machine? You can tell Qt not to use native dialogs: http://www.riverban

Re: [PyQt] binary file viewer with textEdit (PyQt) [correction]

2010-06-24 Thread Mark Summerfield
On 2010-06-24, sandokan wrote: > Mark Summerfield-4 wrote: > > [snip] > > > > Actually I meant: > > file = QFile(self.filename) > > > > if file.open(QIODevice::ReadOnly): > > ba = file.readAll() # ba is a QByteArray filled with raw byt

Re: [PyQt] binary file viewer with textEdit (PyQt) [correction]

2010-06-24 Thread Mark Summerfield
ray(ba[i]).toHex())) self.ui.textEditAscii1.setPlainText("".join(hexbytes)) Still untested though! -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Rapid GUI Programming with Python and Qt" - ISBN 013235

Re: [PyQt] binary file viewer with textEdit (PyQt)

2010-06-24 Thread Mark Summerfield
On 2010-06-24, sandokan wrote: > Mark Summerfield-4 wrote: > > One thing that slows QTextEdit down is its sophisticated layout engine. > > If you can live without that and use a QPlainTextEdit you should get > > some speedup straightaway. > > Wow, this works perfectly

Re: [PyQt] Adding a layout to a QSlider widget

2010-06-23 Thread Mark Summerfield
app=QtGui.QApplication(args) w=SliderWithBrowser() w.show() app.exec_() if __name__=="__main__": import sys test(sys.argv) The above works fine for me. And you should be able to use SliderWithBrowser just like any other widget. -- M

Re: [PyQt] using itemDoubleClicked with pyqt

2010-06-23 Thread Mark Summerfield
etItem*)"), self.currentChanged) and the currentChanged method would look like this: def currentChanged(self, currentListItem, previousListItem): pass Hope that helps:-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy &qu

Re: [PyQt] binary file viewer with textEdit (PyQt)

2010-06-22 Thread Mark Summerfield
slows QTextEdit down is its sophisticated layout engine. If you can live without that and use a QPlainTextEdit you should get some speedup straightaway. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming&quo

Re: [PyQt] Master-detail relationship with plain QTableView tables (no SQL database)

2010-06-17 Thread Mark Summerfield
On 2010-06-14, Vadym Honcharuk wrote: > thank you, Mark! > > one more question about applying filter in the context of > QSortFilterProxyModel: [snip] > > Question what method is analog of SQL setFilter() in context of > QSortFilterProxyModel? There are two approac

Re: [PyQt] QPlainTextEdit not created in a widget through a QAction

2010-06-07 Thread Mark Summerfield
On 2010-06-07, Gerardo Gutierrez wrote: > Thanks Mark, I did some things that you recommended: Hi Gerardo, > I changed the notebook class, so it inherits from QWIdget and no container > need to be used, the notebook itself is going to be embedded in the > QScrollArea: > &

Re: [PyQt] Problem with printing to pdf

2010-06-07 Thread Mark Summerfield
tion but I've been searching the > net and could not find an answer. I'm not aware of any signal that will tell you this, so I'd suggest polling QPrinter.printerState(). -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt

Re: [PyQt] QPlainTextEdit not created in a widget through a QAction

2010-06-05 Thread Mark Summerfield
at through the QMenu QAction the cells are being > appended but not showed. This doesn't happen if I call the function > new_input_cell from the constructor in the mainwindow class. I don't know why, but I am suspicious that you have made the QAction's parent be the QMenu; I would

Re: [PyQt] Master-detail relationship with plain QTableView tables (no SQL database)

2010-06-05 Thread Mark Summerfield
ddition to the data in the tables) at once, so I prefer writing to the file directly using a single QDataStream. [snip] -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Advanced Qt Programming" - ISBN 0321635906

Re: [PyQt] Master-detail relationship with plain QTableView tables (no SQL database)

2010-06-05 Thread Mark Summerfield
On 2010-06-05, Mark Summerfield wrote: > On 2010-06-05, Vadym Honcharuk wrote: > > Thanks a lot, Mark! > > Hi Vadym, > > One approach that you could take is to write the count of how many > things you're going to write and then write the things. For example, > y

Re: [PyQt] Master-detail relationship with plain QTableView tables (no SQL database)

2010-06-04 Thread Mark Summerfield
On 2010-06-05, Vadym Honcharuk wrote: > Thanks a lot, Mark! Hi Vadym, One approach that you could take is to write the count of how many things you're going to write and then write the things. For example, you could try something like this: write data: srcCount = self.srcTableMod

Re: [PyQt] QTableWidget: cannot alter text of header labels

2010-05-21 Thread Mark Summerfield
eWidget() > > self.tw.setColumnCount(5) > > - Attempt 1: > > self.tw.setHorizontalHeaderLabels(("a", "b", "c", "d", "e")) # Doesn't > > work, the default "1" ... "5" are still shown Try passing a list

Re: [PyQt] Master-detail relationship with plain QTableView tables (no SQL database)

2010-05-20 Thread Mark Summerfield
On 2010-05-20, Vadym Honcharuk wrote: > 2010/5/9 Mark Summerfield : [snip] > Thank you, Mark! > > One more question in this issue is how to save data from these three > tables with different models in one file by QDataStream module. The > point of problem in that save method c

Re: [PyQt] Performance problems with QSortFilterProxyModel

2010-05-13 Thread Mark Summerfield
On 2010-05-12, Steve Borho wrote: > On Wed, May 12, 2010 at 1:04 AM, Mark Summerfield wrote: > > On 2010-05-12, Steve Borho wrote: > >> Hello, > >> > >> The TortoiseHg project is currently porting all of our PyGTK apps to > >> PyQt, This has been

Re: [PyQt] Performance problems with QSortFilterProxyModel

2010-05-11 Thread Mark Summerfield
the model data() > method, which takes about 15 seconds. Have you tried switching off sorting just before resetting the model and then switching it back on afterwards? [snip] -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Pr

Re: [PyQt] Master-detail relationship with plain QTableView tables (no SQL database)

2010-05-08 Thread Mark Summerfield
On 2010-05-08, Vadym Honcharuk wrote: > Hi to All, > > I need three tables with master-detail relationship one to other. I > made QTableView Model from Mark book and three vertical frame on one > page for it. How possible connect these tables with master-detail > relation

Re: [PyQt] PyQt book: examples now available for Python 3.1 + PyQt API 2

2010-04-29 Thread Mark Summerfield
On 2010-04-29, Jean-Claude Repetto wrote: > Le 29/04/2010 10:54, Mark Summerfield a écrit : > > I've now ported the PyQt book's examples to Python 3.1 and PyQt's API 2. > > Hi Mark, > > Will you publish soon a new edition of the book, based on Python 3 and >

[PyQt] PyQt book: examples now available for Python 3.1 + PyQt API 2

2010-04-29 Thread Mark Summerfield
omatically converts to/from QVariant. Overall I was pleasantly surprised at how straightforward the porting was (although I didn't do much testing!). API 2 code is cleaner and clearer than API 1 code---and more Pythonic with the use of str instead of QString and the elimination of QVariant. -

Re: [PyQt] Converting to API 2

2010-04-23 Thread Mark Summerfield
On 2010-04-22, detlev wrote: > On Donnerstag, 22. April 2010, Mark Summerfield wrote: > > Hi, > > > > I'm starting to convert the examples from my PyQt book to Python 3 with > > API 2. Perhaps I'm not awake yet, but I'm puzzled by this: > > > &g

[PyQt] Converting to API 2

2010-04-22 Thread Mark Summerfield
has unexpected type 'str' And also by this: >>> fh = QFile("/tmp/data") >>> fh.open(QIODevice.WriteOnly) True >>> out = QDataStream(fh) >>> out << "hello" Traceback (most recent call last): File

Re: [PyQt] Threading crashes

2010-04-20 Thread Mark Summerfield
On 2010-04-20, andre hotz wrote: > Mark Summerfield schrieb: > > On 2010-04-20, andre hotz wrote: > >> Hey, > >> > >> I have a problem with my QThreads (running on windows). It is the first > >> time I use multithreading, so I am probably doing som

[PyQt] "sip: QFileIconProvider is undefined" from import of QtGui/QtGuimod.sip with SIP 4.10, Qt 4.6.1 and Python 2.5.1

2010-03-30 Thread Mark Floyd
I'm trying to run a simple .sip file example and can't seem to get the bloody thing to run. Here is my small example *without* the import of QtGui/QtGuimod.sip... which will build normally: Working Example working.sip ### %Module word 0 End working.sip % sip -I/rel/lang/python/2.5.1-6

[PyQt] Using new-style connections with QSignalMapper

2010-03-08 Thread Mark Visser
OT("map()")) self.mapper.mapped[QString].connect(self.sayIt) @pyqtSlot(QString) def sayIt(self, name): print name t = Test() t.show() app.exec_() ||=| cheers, -Mark -- Mark Visser, Software Director Lumière VFX Email:

Re: [PyQt] Render ps files

2010-03-06 Thread Mark Summerfield
to convert PS to PDF and then use the Qt version of the poppler library to render the PDF pages to QImages. (I've done this in C++/Qt and believe that there is a Python wrapper for poppler, but I haven't used it.) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python,

Re: [PyQt] QAbstractItemModel's "dataChanged" signal not working?

2010-03-02 Thread Mark Summerfield
gnal in your reimplemented setData() method. But if you're using QSqlRelationalTableModel directly then it isn't obvious to me what you're doing wrong. However, dataChanged() might be the wrong signal for reenabling the Add button since it is emitted for every change to every f

[PyQt] Using a preview widget with a QColumnView

2010-01-14 Thread Mark Visser
or me, the pane is blank. I've confirmed that the updatePreviewWidget signal is being emitted. (Python 2.5.4, Qt 4.6.0, PyQt 4.6.2, X11) cheers, -Mark -- Mark Visser, Software Director Lumière VFX Email: ma...@lumierevfx.com Phone: +1-514-316-1080 x3030

Re: [PyQt] problems with PyQt book custom view examples [Win7]

2009-12-17 Thread Mark Summerfield
ion. Phil also replied to this saying, "make sure PyQt is built with SIP 4.9.3". But you are quite right: none of the examples has been tested with Windows 7 or on 64-bit machines (at least not by me, since I don't have Windows 7 or a 64-bit machine---hopefully that'll chang

[PyQt] PyQt4 - examples/designer/plugins/plugins.py: Can not see " PyQt Examples" group when qt4 designer comes up

2009-12-14 Thread Mark Floyd
ny help on where to start looking for the source of the failed example plugin loads would be most appreciated. I've been digging into the problem off and on for the past few weeks and haven't found any leads. The silent failure is really complicating things. - Mark _

Re: [PyQt] problems with PyQt book custom view examples [Win7]

2009-12-08 Thread Mark Summerfield
. But API 2 is not supposed to be the default for Python 2 and you say you're using Python 2.6... > > > 2009/12/8 Mark Summerfield > > > On 2009-12-08, Romi Agar wrote: > > > Everything else seems to be working apart from the little bug with > > > saving appl

Re: [PyQt] problems with PyQt book custom view examples [Win7]

2009-12-08 Thread Mark Summerfield
relaunched. I checked, that recently used > program data gets written to the registry (at least some kind of byte > array) on application termination, but somewhere in the application > loading process it gets lost or is not recognised. In which particular example(s) does that occur? > 200

Re: [PyQt] Moving from Python 2 to Python 3: A 4 page "cheat sheet"

2009-12-02 Thread Mark Summerfield
On 2009-12-01, Glenn Linderman wrote: > On approximately 12/1/2009 6:15 AM, came the following characters from > > the keyboard of Mark Summerfield: > > Here's the direct link: > > http://ptgmedia.pearsoncmg.com/imprint_downloads/informit/promotions/... > > Pro

[PyQt] Moving from Python 2 to Python 3: A 4 page "cheat sheet"

2009-12-01 Thread Mark Summerfield
or anything) from InformIT's website. Here's the direct link: http://ptgmedia.pearsoncmg.com/imprint_downloads/informit/promotions/... And of course, if you want more on Python 3, there's always the documentation---or my book:-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, P

Re: [PyQt] Problem with class inheriting QDialog

2009-11-21 Thread Mark Summerfield
tButtonClicked) > def EditButtonClicked(self): > self.dialog = Dialog(self) > print type(self.dialog) > self.dialog.exec_() > -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Programming in Pyth

Re: [PyQt] need drawing application demo

2009-11-19 Thread Mark Summerfield
to do all the things you mention. The book's examples can be downloaded from my web site. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Rapid GUI Programming with Python and Qt" - ISBN 0132354187 _

Re: [PyQt] Stacking QWidgets vertically?

2009-09-21 Thread Mark Summerfield
On 2009-09-21, Mark Summerfield wrote: > On 2009-09-21, Kurt Schwarz wrote: > > A QSplitter isn't what I am looking for because "A splitter lets the > > user control the size of child widgets by dragging the boundary > > between the children." I don'

Re: [PyQt] Problem with boundingRect in PyQt snapshot

2009-09-17 Thread Mark Summerfield
be dropped? I think it would be a pity to keep it. Most of its methods are available in Python anyway, and for those few that aren't couldn't you provide some static methods that either take a one character string or that only consider the first character? -- Mark Summerfield,

Re: [PyQt] Selecting several table items

2009-08-20 Thread Mark Summerfield
; Best regards, > > Mads Hi Mads, All Q*View widgets have a selectionModel() method that returns a _view_-specific QItemSelectionModel. You can use this to perform complex selections programmatically. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and co

Re: [PyQt] PyQt4 question related to QVariant

2009-07-04 Thread Mark Summerfield
ue() method. > > Regards, > Detlev If you're going to store anything it ought to be a QPersistentModelIndex. Here's what the QModelIndex docs say "Note: Model indexes should be used immediately and then discarded. ... If you need to keep a model index over time use a QPersiste

[PyQt] PyQt4 book - updated examples

2009-06-23 Thread Mark Summerfield
their while! I've only done the most simple tests on them because I'm so busy with other things at the moment, so let me know if you hit any problems. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Rapid GUI Progra

Re: [PyQt] Bug report: Installer PyQt-Py2.5-gpl-4.4.3-1 for windows (second attempt)

2009-06-10 Thread Mark Khait
On Wed, Jun 10, 2009 at 5:02 PM, Phil Thompson wrote: > On Wed, 10 Jun 2009 16:54:10 +0600, Mark Khait > wrote: >> When Python is installed in “User only” mode (not for all users), > PyQt >> installer can`t locate Python`s install path. >> I think installer

[PyQt] Bug report: Installer PyQt-Py2.5-gpl-4.4.3-1 for windows (second attempt)

2009-06-10 Thread Mark Khait
’). Also, when launched under user (not Administrator) account, installer doesn`t save info about PyQt4 in registry (in HKEY_CURRENT_USER root, SOFTWARE\PyQt4). It saves info only in HKEY_LOCAL_MACHINE root, only when launched under Administrator account. Thanks, Mark. P.S. Please answer you can read

Re: [PyQt] PyQt4 for Python 3

2009-06-10 Thread Mark Summerfield
On 2009-06-10, Phil Thompson wrote: > On Wed, 10 Jun 2009 07:40:52 +0100, Mark Summerfield wrote: > > On 2009-06-09, Phil Thompson wrote: > >> On Sat, 6 Jun 2009 08:36:44 +0100, Mark Summerfield [snip] > >> I can't reproduce this. Any chance you were hitting the

[PyQt] PyQt4 for Python 3

2009-06-06 Thread Mark Summerfield
pyw Traceback (most recent call last): File "./imagechanger.pyw", line 264, in fileNew dialog = newimagedlg.NewImageDlg(self) File "/home/mark/books/rapid-gui-programming-with-python-and- qt/eg3/chap06/newimagedlg.py", line 22, in __init__ self.setupUi(self) File

Re: [PyQt] Insertrow with QSqlTableModel doesn't work

2009-05-23 Thread Mark Summerfield
ct", QtCore.QVariant(idproject)) > query.bindValue(":description", > QtCore.QVariant(QtCore.QVariant(QtCore.QString("Neues Projekt" > query.bindValue(":idunit", QtCore.QVariant(1)) > query.bindValue(":idpartner", QtCor

Re: [PyQt] doubts about Example Book Rapid GUI Programming with Python and Qt

2009-05-05 Thread Mark Summerfield
p(20) # 20 seconds > > > Where I must to put this statement above? I did this so far: > > http://pastebin.com/m645e6291 All the book's examples are available online so you can download them and see them complete and in context: http://www.qtrac.eu/pyqtbook.html -- Mark Summerfie

Re: [PyQt] QTableView header connection

2009-03-18 Thread Mark Summerfield
;) or if you just want to know the column that was clicked QtCore.SIGNAL("sectionClicked(int)") > > If you double click, the signal should be doubleClicked(). > > Till > > ___ > PyQt mailing listPyQt@riverbankc

Re: [PyQt] QSortFilterProxyModel.createIndex from within a slot callback

2009-02-27 Thread Mark Summerfield
_. For top-level items this is easy: QModelIndex(); but inside the method using index.parent() should work fine. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Programming in Python

[PyQt] Windows/OS X installers for PyQt4 apps

2009-02-06 Thread Mark Voorhies
click to install". My initial googling suggests py2exe for Windows and py2app for OS X, but I am particularly interested in the quirks of using such tools to package PyQt. Thank you for your time, Mark Voorhies ___ PyQt mailing li

Re: [PyQt] Catching key events Re: [PyQt] Catching key events

2009-01-19 Thread Mark Summerfield
On 2009-01-19, Frédéric wrote: > Le 19/1/2009, "Mark Summerfield" a écrit: > >I suspect that using grabKeyboard()/releaseKeyboard() is not the right > >approach---for example, I've never seen them used in practice and have > >never used them myself. > &g

Re: [PyQt] Catching key events

2009-01-19 Thread Mark Summerfield
that PyQt is _different_ from Gtk so IMO it is best to find the PyQt-ish approach rather than to attempt a straight conversion from Gtk to PyQt code. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Programming in Python 3&q

Re: [PyQt] Log viewer

2009-01-19 Thread Mark Summerfield
On 2009-01-16, Frédéric wrote: > On vendredi 16 janvier 2009, Mark Summerfield wrote: > > If you have 100K + log lines then a list model + QListView (+ custom > > delegate if you want fine control over rendering); but anything less and > > QPlainTextEdit + a simple data class

Re: [PyQt] Log viewer Re: [PyQt] Log viewer

2009-01-16 Thread Mark Summerfield
On 2009-01-16, Frédéric wrote: > Le 16/1/2009, "Mark Summerfield" a écrit: > >QPlainTextEdit is optimized for use as a log display and has > >appendHtml() and appendPlainText(). For Qt 4.3 or earlier use QTextEdit > >or QTextBrowser instead. > > Tha

Re: [PyQt] Log viewer

2009-01-16 Thread Mark Summerfield
lainTextEdit is optimized for use as a log display and has appendHtml() and appendPlainText(). For Qt 4.3 or earlier use QTextEdit or QTextBrowser instead. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy &q

Re: [PyQt] QPainter bug(?) in printing.pyw example from PyQt book

2009-01-09 Thread Mark Summerfield
o it looks to me like a Qt (or PyQt) bug that was not present in Qt 4.3. My preferred workaround is: painter.setPen(Qt.NoPen)# workaround painter.setPen(Qt.black) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy

Re: [PyQt] Learning path

2009-01-09 Thread Mark Summerfield
On 2009-01-09, Steven Woody wrote: > Hi, > > I want to use PyQt but I don't get experience with Qt itself. What's > the best learning path to me? Any suggestion will be highly > appreciated! Well obviously the first step is to buy my book:-) -- Mark Summerfield, Qtra

Re: [PyQt] PyQt4.Qtcore defines 'hex'

2009-01-07 Thread Mark Summerfield
uses users trying to learn PyQt. > > > > *None* of the PyQt4 examples uses star imports. > > Hmmm, apologies then, must have been exclusively a problem with Mark > Summerfield's tutorial stuff. I have now switched to a new style for imports, for example: from PyQ

[PyQt] OT: New Book: Programming in Python 3

2008-12-04 Thread Mark Summerfield
d programs as they work through the chapters. Note: The only GUI coverage is of tkinter! (But still worth reading just to see what a pure joy PyQt is by comparison;-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy __

Re: [PyQt] Re: dialogs and extentions

2008-10-30 Thread Mark Summerfield
On 2008-10-29, Wim Verhavert wrote: > Thanks for your reply Mark. I tried the discussed procedure this > afternoon, and yes this works, but as you said, this will not allow > for user resize, which is a pitty. The older approach did allow for > resize, so I consider this a step back

Re: [PyQt] Re: dialogs and extentions

2008-10-29 Thread Mark Summerfield
w.qtrac.eu/pyqtbook.html The example is: eg/chap09/findandreplace.{py,pyw} (the .pyw version is all in code the .py version's form is a .ui file) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "C++ GUI Programming with Qt

Re: [PyQt] PyQt menu and tool tip font

2008-10-25 Thread Mark Summerfield
e.g. app = QApplication(sys.argv) app.setFont(QFont("Helvetica", 16)) You can find out what fonts are availabe to Qt using QtGui.QFontDatabase(). -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Programming in Python

Re: [PyQt] 2 litlle questions

2008-10-23 Thread Mark Summerfield
nes, > but the returned line separators are unknow chars for my computer. You're getting the Unicode line break character. Add this line before you print the text: sel = sel.replace(u"\u2029", "\n") > Another : I saw that Mark Summerfield recently played with t

Re: [PyQt] QSpinBox with hex format

2008-10-23 Thread Mark Summerfield
html You can download the examples, it is chap11/romanspinbox.py There's an example of subclassing a QSpinBox for hex numbers in my C++/Qt book (so it is in C++ but easy to translate to PyQt): http://www.informit.com/store/product.aspx?isbn=0132354160 Again, you can download the examples, it is i

[PyQt] strange dialog slowness

2008-10-21 Thread Mark Summerfield
if anyone else had hit the problem and maybe had a fix they could suggest? Thanks! -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy "Rapid GUI Programming with Python and Qt" - ISBN 0132354187 ___

  1   2   3   >