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
šãñ 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
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
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,
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:
> >
> >
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:
>
> ...
>
(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
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
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
://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++,
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
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
document.setHtml(text)
> painter.save()
> color = palette.highlight().color() \
> if option.state & QStyle.State_Selected \
> else QColor(index.model().data(index,
> Qt.BackgroundColorRole))
> painter.fillRect(option.rect, co
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
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
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/
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
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
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++
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
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:-)
--
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
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
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.
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
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
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
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
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
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
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
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
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
[snip]
BTW I devote four 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,
_init__()
use something like this:
QTimer.singleShot(0, self, SLOT(initialize))
and in your initialize() method do self.nb.new_input_cell() etc.
Sorry I couldn't see the answer to your problem, but hope the other
comments prove helpful!
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
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
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
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
pletion = stream.readInt32()
evolvingGasTemperature = 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
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
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
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
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
nged(QModelIndex,QModelIndex) signal to a custom slot.
Then, in the custom slot you handle the populating of the detail table,
for example, by filtering (which you can do with a sort/filter proxy
model).
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and
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
>
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.
-
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
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
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
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,
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
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
. 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
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
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
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
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
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
_
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'
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,
; 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
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
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
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
Array(b'bmp').
For Python 3 I'm now doing it like this:
text = byte_array.data().decode("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 straightfor
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
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
;)
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
_. 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
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
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
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
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
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
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
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
ate set of Python 2.6 versions of the examples and these use the new
import style.
> FWIW, I still think sticking a _ on the end 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 ac
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
__
again the dialog does 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:
&
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
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
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
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
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
___
ta with in setData().
You'd need to implement a custom delegate. A custom delegate you
control over how data is displayed or over how it is edited or both.
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
"Rapid GUI Progr
d, so
here is one on style:
Instead of calling query.first() and query.isValid() just do:
while query.next():
...
The first time query.next() is called it will go to the first record;
and when there are no more records it will return False.
[snip]
--
Mark Summerfield, Qtrac Lt
me "version 25 of PyQt4 for Qt 4.x" Or maybe 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
_
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
th bytes items), plus
wrappers so that strs can be used (just like the bsdb module offers).
- Support super() so that it can be used in PyQt subclasses just like
any other subclasses.
;-)
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++
anges.
Since Python 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, P
On 2008-08-08, Phil Thompson wrote:
> On Fri, 8 Aug 2008 08:02:55 +0100, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > On 2008-08-08, Boris Barbour wrote:
> >> Hi,
> >>
> >> Importing PyQt4.QtCore seems to alter or shadow the builtin hex()
> >>
27;0x7b'
>>> # restore built-in hex
>>> hex = __builtins__.hex
>>> hex(123)
'0x7b'
In Python 3 you'll be able to do "import builtins" and use
builtins.hex(). But I'm hoping that in PyQt4 for Python 3, the * imports
will onl
rence web site: http://pyconuk.org
--
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.
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 = Q
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")
> > >>>
ll return true because
operator[] returns a const QChar &, but in PyQt4 s[0] is still 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
ect (for QVariant),
none of those kind of subtle problems would arise. It would also put an
end to having to know which kind of string you have and converting
between the two kinds.
Of course QString has some methods that unicode/str doesn't have. That
was al
#x27;),
QtGui.qApp, QtCore.SLOT('quit()'))
if __name__ == "__main__":
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
kes the item the current item
self.table.scrollToItem(selected) # makes the item 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
ite
1 - 100 of 179 matches
Mail list logo