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

2013-01-11 Thread Mark Summerfield
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...@riverbankcomputing.com] On Behalf Of Mark Summerfield Sent: 11 December 2012 09:36 To: pyqt

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

2013-01-11 Thread Mark Summerfield
and PySide. However, 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”?

2012-12-11 Thread Mark Summerfield
.- 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, Qt, PyQt - training

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

2012-12-11 Thread Mark Summerfield
it to be an excellent guide, Tony -Original Message- From: pyqt-boun...@riverbankcomputing.com [mailto:pyqt- boun...@riverbankcomputing.com] On Behalf Of Mark Summerfield Sent: 11 December 2012 09:36 To: pyqt@riverbankcomputing.com Subject: Re: [PyQt] A good PyQt

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 baz...@ftml.net 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: $ cd qt483src $ ./configure -prefix

[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 ___ PyQt mailing list

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 wolfg...@rohdewald.de 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 about the height offset

Re: [PyQt] How to destroy SIGNAL

2010-11-16 Thread Mark Summerfield
/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++, Python, Qt, PyQt - training and consultancy

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

2010-09-07 Thread Mark Summerfield
On Tue, 7 Sep 2010 01:37:45 +0200 Wolfgang Rohdewald wolfg...@rohdewald.de 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, something like

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 wolfg...@rohdewald.de 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 if that improves

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

2010-09-06 Thread Mark Summerfield
QColor(index.model().data(index, Qt.BackgroundColorRole)) painter.fillRect(option.rect, color) painter.translate(option.rect.x(), option.rect.y()) document.drawContents(painter) painter.restore() -- Mark Summerfield, Qtrac Ltd

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

2010-08-25 Thread Mark Summerfield
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.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid

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

2010-08-25 Thread Mark Summerfield
. Chris On 25.08.2010 10:30, Mark Summerfield wrote: On Wed, 25 Aug 2010 10:16:08 +0200 Christopher M. Nahlerchristopher.nah...@papermodels.at wrote: I have done more tests and found the following: - I have tried self.update() in various locations of updateItems() and it did

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

2010-08-24 Thread Mark Summerfield
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/aqpbook.html ___ PyQt mailing list

Re: [PyQt] Trouble implementing a TableView model

2010-08-03 Thread Mark Summerfield
standard items: look up QStandardItemModel.sortRole() QStandardItemModel.setSortRole(). [snip] -- 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

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

2010-07-21 Thread Mark Summerfield
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 consultancy

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

2010-07-20 Thread Mark Summerfield
Hi Sathishkumar, On Tue, 20 Jul 2010 10:33:34 +0530 Sathishkumar Duraisamy flowers...@gmail.com 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 time

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

2010-07-20 Thread Mark Summerfield
one for Phil:-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid GUI Programming with Python and Qt - ISBN 0132354187 http://www.qtrac.eu/pyqtbook.html ___ PyQt mailing list

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

2010-07-19 Thread Mark Summerfield
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:-) -- Mark Summerfield, Qtrac Ltd

Re: [PyQt] best practices for MDI app

2010-07-15 Thread Mark Summerfield
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 in Python 3 - ISBN 0321680561

Re: [PyQt] best practices for MDI app

2010-07-15 Thread Mark Summerfield
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:-) -- Mark Summerfield, Qtrac Ltd

Re: [PyQt] ProgressBar - Activity Mode

2010-07-14 Thread Mark Summerfield
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 exactly what you want. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C

Re: [PyQt] best practices for MDI app

2010-07-14 Thread Mark Summerfield
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.eu C++, Python, Qt, PyQt - training and consultancy Advanced Qt Programming

Re: [PyQt] adding context menu to graphics item

2010-07-08 Thread Mark Summerfield
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.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid

Re: [PyQt] QTranslator and QFileDialog problems

2010-06-25 Thread Mark Summerfield
://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qfiledialog.html#Option- enum -- 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 I

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 fine. However, I still have a problem

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

2010-06-24 Thread Mark Summerfield
())) 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 0132354187 http://www.qtrac.eu/pyqtbook.html

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 bytes hexbytes = [] for i in range(ba.count

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

2010-06-23 Thread Mark Summerfield
larger binary files (let say up to 10-20 MBs) in textEdit widget without waiting more than few seconds? Hi Tom, 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. -- Mark

Re: [PyQt] using itemDoubleClicked with pyqt

2010-06-23 Thread Mark Summerfield
): pass Hope that helps:-) -- 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 A true story... I ordered a Dell netbook

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

2010-06-23 Thread Mark Summerfield
() 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. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Programming in Python

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

2010-06-17 Thread Mark Summerfield
chapters of my forthcoming book, Advanced Qt Programming, to Qt's model/view classes---the book is C++-based but many of the concepts and idioms can easily be translated into PyQt. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Advanced Qt

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

2010-06-07 Thread Mark Summerfield
the other comments prove helpful! [snip] -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid GUI Programming with Python and Qt - ISBN 0132354187 ___ PyQt mailing listPyQt

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

2010-06-06 Thread Mark Summerfield
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 ___ PyQt mailing

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

2010-06-06 Thread Mark Summerfield
try making the QAction's parent the QWidget the QMenu is associated with (e.g., the Notebook if you change it to be a QWidget or self._container otherwise). Good luck! -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Advanced Qt Programming

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

2010-06-05 Thread Mark Summerfield
= stream.readInt32() ... [snip] I hope this helps! -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy C++ GUI Programming with Qt 4 - ISBN 0132354160 ___ PyQt mailing listPyQt

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, you could try something like this: write

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

2010-05-21 Thread Mark Summerfield
) - Attempt 1: self.tw.setHorizontalHeaderLabels((a, b, c, d, e)) # Doesn't work, the default 1 ... 5 are still shown Try passing a list not a tuple, i.e., self.tw.setHorizontalHeaderLabels([a, b, c, d, e]) # works for me -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt

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 l...@qtrac.plus.com: [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 calling

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 l...@qtrac.plus.com 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 going pretty well so far, but I've hit a snag

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

2010-04-29 Thread Mark Summerfield
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. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy

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's API 2 ? Hi Jean-Claude, I'm just

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: Python 3.1.2 (r312:79147, Mar 25 2010, 07:42:02) [GCC

[PyQt] Converting to API 2

2010-04-22 Thread Mark Summerfield
): File pyshell#11, line 1, in module out hello ValueError: string of length 1 expected What am I missing here? -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Programming in Python 3 (Second Edition) - ISBN 0321680561

Re: [PyQt] Render ps files

2010-03-06 Thread Mark Summerfield
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, Qt, PyQt - training and consultancy

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

2010-03-02 Thread Mark Summerfield
connecting to the QAbstractItemModel::rowsInserted() signal? I had a quick go at changing assetmanager.pyw to do this but without success (using PyQt 4.6 and Qt 4.5.2); maybe things have improved with Qt 4.6. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training

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

2009-12-17 Thread Mark Summerfield
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 change next summer). -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training

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

2009-12-08 Thread Mark Summerfield
, 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? 2009/12/8 Mark Summerfield m...@qtrac.eu

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

2009-12-08 Thread Mark Summerfield
for Python 2 and you say you're using Python 2.6... 2009/12/8 Mark Summerfield l...@qtrac.plus.com On 2009-12-08, Romi Agar wrote: Everything else seems to be working apart from the little bug with saving application settings to Windows registry. It does remember the application size

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/... Produces File not found. in a web page, when I

Re: [PyQt] Problem with class inheriting QDialog

2009-11-21 Thread Mark Summerfield
) self.dialog.exec_() -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Programming in Python 3 (Second Edition) - ISBN 0321680561 ___ PyQt mailing listPyQt@riverbankcomputing.com http

Re: [PyQt] need drawing application demo

2009-11-19 Thread Mark Summerfield
site. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid GUI Programming with Python and Qt - ISBN 0132354187 ___ PyQt mailing listPyQt@riverbankcomputing.com http

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't want the user to be able to re-size the widgets

Re: [PyQt] Problem with boundingRect in PyQt snapshot

2009-09-17 Thread Mark Summerfield
, ie. should QChar not 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

Re: [PyQt] Selecting several table items

2009-08-20 Thread Mark Summerfield
, 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 consultancy Programming in Python 3

Re: [PyQt] PyQt4 question related to QVariant

2009-07-05 Thread Mark Summerfield
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 QPersistentModelIndex. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu

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 m...@qtrac.eu 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 tab order bug

[PyQt] PyQt4 for Python 3

2009-06-06 Thread Mark Summerfield
(ascii) # text == bmp I'm not saying this is the best way, just a way that works. Other than that I found the conversion pretty straightforward. I'll put the Python 3 versions on my website soon, hopefully next week. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt

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

2009-05-24 Thread Mark Summerfield
)) query.bindValue(:description, QtCore.QVariant(QtCore.QVariant(QtCore.QString(Neues Projekt query.bindValue(:idunit, QtCore.QVariant(1)) query.bindValue(:idpartner, QtCore.QVariant(idpartner)) query.exec_() Thanks in advance, Volker -- Mark Summerfield, Qtrac Ltd

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

2009-05-05 Thread Mark Summerfield
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 Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training

Re: [PyQt] QTableView header connection

2009-03-18 Thread Mark Summerfield
, the signal should be doubleClicked(). Till ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy

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

2009-02-27 Thread Mark Summerfield
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 3 - ISBN 0137129297 ___ PyQt

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 should be fine. (I'm

Re: [PyQt] Catching key events

2009-01-19 Thread Mark Summerfield
. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Programming in Python 3 - ISBN 0137129297 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo

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 m...@qtrac.eu 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. PyQt has an event handling hierarchy

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 m...@qtrac.eu 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. Thanks, Mark. So, you suggest I subclass

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, Qtrac Ltd, www.qtrac.eu C

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

2009-01-09 Thread Mark Summerfield
in statement.transactions: ... mysticism? Hi Denis, I get exactly the same problem as you do with Qt 4.4, so 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

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

2009-01-07 Thread Mark Summerfield
of the name is silly... Yes, but it has precedents in PyQt already, e.g. QApplication.exec_(). (and in my previous mail when I said David I actually meant Mark, happy new year ;-) ) Understandable since David is a much more regular poster than I am:-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu

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

2008-12-04 Thread Mark Summerfield
. 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 ___ PyQt mailing listPyQt

Re: [PyQt] Re: dialogs and extentions

2008-10-30 Thread Mark Summerfield
not resize down, so that's the only case you have to fix---but I don't think it is easy to do! Thanks again, and by the way: your book is great! Thanks:-D Wim On Wed, Oct 29, 2008 at 4:02 PM, Mark Summerfield [EMAIL PROTECTED] wrote: On 2008-10-29, Wim Verhavert wrote: I already found out

Re: [PyQt] Re: dialogs and extentions

2008-10-29 Thread Mark Summerfield
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 4 - ISBN 0132354160 ___ PyQt mailing listPyQt

Re: [PyQt] PyQt menu and tool tip font

2008-10-25 Thread Mark Summerfield
)) 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 3 - ISBN 0137129297 ___ PyQt mailing list

Re: [PyQt] 2 litlle questions

2008-10-23 Thread Mark Summerfield
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 the Poppler bindings for Qt4. Is there any port of it for PyQt ? I

[PyQt] strange dialog slowness

2008-10-21 Thread Mark Summerfield
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 ___ PyQt mailing

Re: [PyQt] Extracting QSqlQuery results in PyQt4

2008-10-09 Thread Mark Summerfield
it will return False. [snip] -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy C++ GUI Programming with Qt 4 - ISBN 0132354160 ___ PyQt mailing listPyQt@riverbankcomputing.com http

Re: [PyQt] QSqlTableModel and complex queries

2008-10-09 Thread Mark Summerfield
or over how it is edited or both. -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid GUI Programming with Python and Qt - ISBN 0132354187 ___ PyQt mailing listPyQt@riverbankcomputing.com http

Re: [PyQt] Re: PyQt4 and Python 3.0

2008-10-06 Thread Mark Summerfield
something more explicit: PyQt25/Qt4? -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy C++ GUI Programming with Qt 4 - ISBN 0132354160 ___ PyQt mailing listPyQt@riverbankcomputing.com http

Re: [PyQt] PyQt4 and Python 3.0

2008-10-03 Thread Mark Summerfield
be used in PyQt subclasses just like any other subclasses. ;-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy C++ GUI Programming with Qt 4 - ISBN 0132354160 ___ PyQt mailing listPyQt

Re: [PyQt] PyQt4 and Python 3.0

2008-10-03 Thread Mark Summerfield
On 2008-10-03, Paul A. Giannaros wrote: On Fri, Oct 3, 2008 at 5:08 PM, Mark Summerfield [EMAIL PROTECTED] wrote: On 2008-10-03, Phil Thompson wrote: On Fri, 3 Oct 2008 17:11:19 +0200, Detlev Offenbach Here's my personal wish list for Python 3/PyQt4 (including those that Phil is going

[PyQt] Rapid PyQt book - examples for Python 2.6

2008-09-29 Thread Mark Summerfield
2.6 isn't officially available yet I've tested against release candidate 2 and the PyQt 4.4.4 snapshot and used the -3 flag. I hope that this is useful to those who want to make the move to 2.6! -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy

Re: [PyQt] Strange shadowing of hex() function by PyQt4.QtCore

2008-08-08 Thread Mark Summerfield
builtins.hex(). But I'm hoping that in PyQt4 for Python 3, the * imports will only import objects that begin with q or Q, forcing the handful of objects that don't meet this criterion to either be imported explicitly or accessed fully qualified. [Any comment on this, Phil?] -- Mark Summerfield, Qtrac Ltd

[PyQt] Comparing QString with QChar

2008-06-27 Thread Mark Summerfield
a QString---which makes sense because in Python a char is just a str of length 1, but maybe this particular case could be handled more intuitively? -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http

Re: [PyQt] Comparing QString with QChar

2008-06-27 Thread Mark Summerfield
On 2008-06-27, Hans-Peter Jansen wrote: Am Freitag, 27. Juni 2008 schrieb Mark Summerfield: Hi, I got caught by this today: from PyQt4.QtCore import * s = QString(X) c = QChar(X) s[0] == c False s[0] == QString(c) True In C++/Qt

Re: [PyQt] Comparing QString with QChar

2008-06-27 Thread Mark Summerfield
On 2008-06-27, Phil Thompson wrote: On Fri, 27 Jun 2008 09:38:04 +0100, Mark Summerfield [EMAIL PROTECTED] wrote: Hi, I got caught by this today: from PyQt4.QtCore import * s = QString(X) c = QChar(X) s[0] == c False s[0] == QString(c

Re: [PyQt] QVariant and Python list

2008-05-30 Thread Mark Summerfield
and Trolltech solved that by providing some static methods (that accept and return Java Strings) to fill the gaps; the same could be done in PyQt. My 2c;-) -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt

Re: [PyQt] a newbie pyqt question, the pyqt book related

2008-05-29 Thread Mark Summerfield
visible to the user In a QTableView it is possible to have a selected item that is not the current item, in other words there are two different concepts selected item and current item. -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing

Re: [PyQt] QWidget focusInEvent() ?

2008-05-29 Thread Mark Summerfield
: app = QtGui.QApplication(sys.argv) tw = TestWidget() tw.show() sys.exit(app.exec_()) -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] OT: A GUI tool to help choose keyboard accelerators for menus dialogs

2008-05-08 Thread Mark Summerfield
++/Qt4 it should be useful to anyone doing GUI programming with PyQt or any other toolkit. Accelerator is licensed under the GNU General Public License v 3 open source license and its source is available from http://www.qtrac.eu/accelerator.html -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu

Re: [PyQt] PyQt's Undo/Redo framework - A Very Short Intro

2008-04-25 Thread Mark Summerfield
On 2008-04-24, Giovanni Bajo wrote: On 4/24/2008 12:30 PM, Mark Summerfield wrote: Hi, I've written a very short introductory article on using PyQt's Undo/Redo framework. It is available here: http://www.informit.com/articles/article.aspx?p=1187104 (The indentation of the last

[PyQt] PyQt's Undo/Redo framework - A Very Short Intro

2008-04-24 Thread Mark Summerfield
, but if not you'll spot it anyway.) The article has been heavily edited for style so it doesn't read like my usual writing, but the content is fine:-) -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http

Re: [PyQt] Custom Model for HDF5 QTreeView?

2008-04-22 Thread Mark Summerfield
. PyQt 6. QScintilla bindings 7. eric4 -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Keyboard shortcuts not working

2008-04-11 Thread Mark Summerfield
() sys.exit(app.exec_()) if __name__ == '__main__': main() ### I've tried using different shortcut context: WindowShortcut, WidgetShortcut, ApplicationShortcut, but it still doesn't work. Any help greately appreciated. -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu

Re: [PyQt] Custom QSqlRelationalDelagate: how to change text?

2008-04-11 Thread Mark Summerfield
/mailman/listinfo/pyqt -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] How to create a user-resizeable widget?

2008-04-10 Thread Mark Summerfield
much for me - I only want a handle between two areas of the window that the user can drag, I don't need crazy floating windows) QSplitter sounds like what you need. -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt

Re: [PyQt] Bug with QGraphicsTextItem in pagedesigner.pyw (Mark Summerfield's script)?

2008-03-25 Thread Mark Summerfield
versions of PyQt, Qt, and Python are you using? What operating system are you using? As I mention at the beginning of chapter 12, this example needs PyQt 4.1 (ideally PyQt 4.2) or later and Qt 4.2 or later. -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu

Re: [PyQt] os.popen output to a progress bar

2008-03-21 Thread Mark Summerfield
. Have you tried self.ui.CHNGSPBar.setValue(int(per)) -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] problem adding data to a QTableWidget

2008-03-03 Thread Mark Summerfield
', 6)]     win = Table(data = d)     win.show()     sys.exit(App.exec_()) -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] problem with QSystemTrayIcon

2008-02-21 Thread Mark Summerfield
() quitAction.connect(quitAction, SIGNAL(triggered()), app, SLOT(quit())) #atray.connect(tray, SIGNAL(clicked())) tray.setToolTip(Ale czad!) tray.showMessage(Title of the message, Body of the message) sys.exit(app.exec_()) Regards, -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu

[PyQt] PyQt4 book: sample chapter etc available online

2008-02-12 Thread Mark Summerfield
the examples and exercise solutions, and the errata are here: http://www.qtrac.eu/pyqtbook.html -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

  1   2   >