Re: [PyQt] Preview skins for Designer

2009-01-19 Thread Frédéric
On mardi 20 janvier 2009, dbod...@trolltech.com wrote: > > BTW, are there some other skins available, somewhere? Did anyone > > design something for Nokia N800/N810 internet tablets? > > There appear to be skins for the N770 and N810 in the package for Qt > Extended 4.4.2: > > http://qtextended.or

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Christoph Burgmer
Am Tuesday, 20. January 2009 schrieb Giovanni Bajo: > On 1/19/2009 4:36 PM, Christoph Burgmer wrote: [...] > > I am doing a > > > > QCoreApplication.postEvent() > > > > out of "run()" from a "threading.Thread" class without any problems. > > That's only because you are lucky. It's not something tha

Re: [PyQt] Dialog behaves as a window

2009-01-19 Thread Doug Bell
Frédéric wrote: > With PyGTK, from glade, it is possible to choose the behaviour of a dialog, > so it is managed as the main window. > > Depending of the window manager, it has more or less effects. For example, > under KDE, it is not created over the main window, but side by side (if > there i

Re: [PyQt] Preview skins for Designer

2009-01-19 Thread dboddie
On Mon Jan 19 17:16:20 GMT 2009, Frédéric wrote: > On lundi 19 janvier 2009, dboddie at trolltech.com wrote: > > I don't know if you can make them automatically appear there, but you > > should be able to load them by selecting the Browse... combo box option. > > Yes, it works :o) > > BTW, are ther

[PyQt] Dialog behaves as a window

2009-01-19 Thread Frédéric
With PyGTK, from glade, it is possible to choose the behaviour of a dialog, so it is managed as the main window. Depending of the window manager, it has more or less effects. For example, under KDE, it is not created over the main window, but side by side (if there is enough space). The more in

Re: [PyQt] QImage, transparent.

2009-01-19 Thread Filip Gruszczyński
Why don't you just clone first image and draw on the other one? 2009/1/19 Matt Smith : > I want to be able to draw lines on an image, without modifying the > image. More specifically I want two images one with the lines and then > the original image below it. Can somebody recommend some classes,

[PyQt] QImage, transparent.

2009-01-19 Thread Matt Smith
I want to be able to draw lines on an image, without modifying the image. More specifically I want two images one with the lines and then the original image below it. Can somebody recommend some classes, preferable I would like to use 2 QImages, but I don't know if I can display one on top of the

[PyQt] Thermal Printer on QPrinter

2009-01-19 Thread Eduardo Willians
Well, I'm trying to config a thermal printer (bematech[1]) with 79mm of paper width (72mm of printing capacity) and continous feed. But is not working correctly. Here is untill I got: app = QApplication(sys.argv) printer=QPrinter() printer.setFullPage(True) printer.setPaperSource(printer.Auto) d

Re: [PyQt] [Resolved] Subclass pyuic4 generated file...

2009-01-19 Thread NoursBleu
Thanx ! In fact, I was wrong with the way to display my new created subclass. I forgot to create a QApplication. Now this work, and slots autoconnection too. Cool. Thanx, all ! ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbank

[PyQt] How to resize a DockWidget

2009-01-19 Thread Marc Nations
Hi, I'm trying to resize a DockWidget after the application has started. I have tried all of the functions that I thought would resize it: self.ui.dockWidget.setGeometry(x,y,w,h) self.ui.dockWidget.resize(w,h) I tried with QSize and QGeometry as well. I also tried using the adjustSize() and a c

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

2009-01-19 Thread Frédéric
On lundi 19 janvier 2009, Mark Summerfield wrote: > > About keyPressEvent, I'm using it, and it works (thanks to David), > > except that the repeat sends press followed by release events, and I > > really need to only get the press event when the key is pressed, and > > the release one when it is

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Frédéric
On lundi 19 janvier 2009, Giovanni Bajo wrote: > On 1/19/2009 5:37 PM, Frédéric wrote: > > I use python threads, but I have a serializer to push all Qt calls on > > a queue, and this queue is processed from the main thread, using a > > QTimer timeout signal. > > This would work on Qt4 as well, but

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Giovanni Bajo
On 1/19/2009 5:37 PM, Frédéric wrote: I use python threads, but I have a serializer to push all Qt calls on a queue, and this queue is processed from the main thread, using a QTimer timeout signal. This would work on Qt4 as well, but of course it's not ideal as you need a timer to poll the q

Re: [PyQt] Preview skins for Designer

2009-01-19 Thread Frédéric
On lundi 19 janvier 2009, dbod...@trolltech.com wrote: > I don't know if you can make them automatically appear there, but you > should be able to load them by selecting the Browse... combo box option. Yes, it works :o) BTW, are there some other skins available, somewhere? Did anyone design som

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Giovanni Bajo
On 1/19/2009 5:03 PM, Christoph Burgmer wrote: Giovanni's response strikes me as it would be a serious annoyance if I had to change my threading model only to port my application to Windows and Mac. I don't even get any QPainter or other thread related warnings in my app, something which KDE t

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Giovanni Bajo
On 1/19/2009 4:36 PM, Christoph Burgmer wrote: Am Monday, 19. January 2009 schrieb Giovanni Bajo: > On 1/19/2009 3:13 PM, eliben wrote: > > I've seen various references to this issue before, but nothing to fully > > address it as I'd expect. > > > > Can you comment on the pros and cons

Re: [PyQt] Preview skins for Designer

2009-01-19 Thread dboddie
On Friday 16 January 2009, Frédéric wrote: > > Le 15/1/2009, "dbod...@trolltech.com" a écrit: > > >Take a look in the tools/qvfb directory in the Qt source distribution, but > >you might need the X11 source package to get access to individual skins. > > Ok, I downloaded them. Where should I put

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. > > > >PyQt has an event handling hierarchy, and

[PyQt] Long SQL result slow QTableView

2009-01-19 Thread Linos
Hello, i have any queries that returns a somewhat large (not too much) number of rows (about 5000 with 7~8 columns), i am using now QSqlQueryModel in a QTableView, the problem it is the load at startup (and when i have to refresh the table for an update), i have thought to use a secondary thre

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Frédéric
On lundi 19 janvier 2009, Christoph Burgmer wrote: > > >QCoreApplication.postEvent() > > >out of "run()" from a "threading.Thread" class without any problems. > > > > Under which plateform? > > Linux. > > I initially made a short check if their was any argument against using > Python threads with

[PyQt] Re: Code example for QPrinter (PyQt4)

2009-01-19 Thread Eduardo Willians
Better: #!/usr/bin/env python import sys from PyQt4.QtCore import * from PyQt4.QtGui import * Appli=QApplication(sys.argv) printer=QPrinter() doc=QTextDocument("Hello" ) dialog = QPrintDialog(printer) dialog.setModal(True) dialog.setWindowTitle("Print Document" ) # dialog.addEnabledOption(QAbs

[PyQt] Re: Code example for QPrinter (PyQt4)

2009-01-19 Thread Eduardo Willians
2009/1/19 Eduardo Willians : > I searched a lot on google and stuff, but I wasn't able to find a code > example for printing with PyQt4. > > If know a tutorial or have a simple file.py that shows how to print > (through a printer) with PyQt4 please send me. > > Thanks. > > Eduardo Willians Really

[PyQt] Code example for QPrinter (PyQt4)

2009-01-19 Thread Eduardo Willians
I searched a lot on google and stuff, but I wasn't able to find a code example for printing with PyQt4. If know a tutorial or have a simple file.py that shows how to print (through a printer) with PyQt4 please send me. Thanks. Eduardo Willians ___ PyQt

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Christoph Burgmer
Am Monday, 19. January 2009 schrieben Sie: > Le 19/1/2009, "Christoph Burgmer" a écrit: > >I am doing a > >QCoreApplication.postEvent() > >out of "run()" from a "threading.Thread" class without any problems. > > Under which plateform? Linux. I initially made a short check if their was any argume

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Sergio Jovani
Sorry! thread = Thread(self) self.connet(thread, SIGNAL("Signal"), self.Slot) thread.start() 2009/1/19 Sergio Jovani : > Hi, > > I always used QThread and emit() in order to communicate with main > QThread without problems: > > thread = Thread(self) > self.connet(thread, SIGNAL("Signal")) > thre

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Sergio Jovani
Hi, I always used QThread and emit() in order to communicate with main QThread without problems: thread = Thread(self) self.connet(thread, SIGNAL("Signal")) thread.start() 2009/1/19 Christoph Burgmer : > Am Monday, 19. January 2009 schrieb Giovanni Bajo: > >> On 1/19/2009 3:13 PM, eliben wrote:

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Frédéric
Le 19/1/2009, "Christoph Burgmer" a écrit: >I am doing a >QCoreApplication.postEvent() >out of "run()" from a "threading.Thread" class without any problems. Under which plateform? -- Frédéric ___ PyQt mailing listPyQt@riverbankcomputing.com h

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Christoph Burgmer
Am Monday, 19. January 2009 schrieb Giovanni Bajo: > On 1/19/2009 3:13 PM, eliben wrote: > > I've seen various references to this issue before, but nothing to fully > > address it as I'd expect. > > > > Can you comment on the pros and cons of using QThread vs Python's threads > > with PyQt? > > > >

Re: [PyQt] How do I get a clean empty transparent image?

2009-01-19 Thread Grzegorz Adam Hankiewicz
El 19/01/2009, a las 0:18, David Boddie escribió: How can I clean the image leaving the image transparent? Use the QImage.fill() method, passing a transparent colour: big = QImage(size, images[0].height(), QImage.Format_ARGB32) big.fill(qRgba(0,0,0,0)) Nice. Thanks for the help. ___

Re: [PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread Giovanni Bajo
On 1/19/2009 3:13 PM, eliben wrote: I've seen various references to this issue before, but nothing to fully address it as I'd expect. Can you comment on the pros and cons of using QThread vs Python's threads with PyQt? I'll begin: on the surface, Python's threads make more sense because they'

[PyQt] SIP build-error on mac: "Error: SIP requires Python to be built as a framework"

2009-01-19 Thread Ben Jakb
hi I try to build sip on my mac os x, but I always get the same error that might caused by the fact that I dont work with the preinstalled python. I've built python 2.6.1 from sources. $ which python /usr/local/bin/python Here is the errorlog I get when running $ python configure.py Error:

[PyQt] Threads with PyQt. Qt's or Python's?

2009-01-19 Thread eliben
I've seen various references to this issue before, but nothing to fully address it as I'd expect. Can you comment on the pros and cons of using QThread vs Python's threads with PyQt? I'll begin: on the surface, Python's threads make more sense because they're Qt independent and can be ported be

Re: [PyQt] Embedding matplotlib into PyQt

2009-01-19 Thread Christoph Burgmer
Am Monday, 19. January 2009 schrieb eliben: > As part of my PyQt learning process, I've recoded my "embedding matplotlib > into wxPython demo" > (http://eli.thegreenplace.net/2008/08/01/matplotlib-with-wxpython-guis/) in > PyQt. Here's the resulting code: I think Anki (the flashcard program) alrea

[PyQt] Embedding matplotlib into PyQt

2009-01-19 Thread eliben
Hello, As part of my PyQt learning process, I've recoded my "embedding matplotlib into wxPython demo" (http://eli.thegreenplace.net/2008/08/01/matplotlib-with-wxpython-guis/) in PyQt. Here's the resulting code: http://paste.pocoo.org/show/100359/ The demo features: * Using the navigation toolb

Re: [PyQt] QModelIndex.internalPointer() is a weak reference ?

2009-01-19 Thread Phil Thompson
On Mon, 19 Jan 2009 00:40:38 +0100, Luper Rouch wrote: > Hi, > > I have to maintain references to the objects passed to QModelIndex or I > get segfaults (and all kinds of other weird results) when accessing them > via internalPointer(), which makes me either think the reference > counting is b

Re: [PyQt] Catching key events

2009-01-19 Thread Frédéric
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. > >PyQt has an event handling hierarchy, and IMO it is best to start with >the least

Re: [PyQt] Catching key events

2009-01-19 Thread Mark Summerfield
On 2009-01-17, Frédéric wrote: > On vendredi 16 janvier 2009, Frédéric wrote: > > 1) catching key events > > > > I found that I have to implement the keyPressEvent() method. I did this > > in the mainWindow, but the behaviour depend where is the focus. And as I > > want to catch arrow keys, it also

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 g

Re: [PyQt] An "UI update" event/signal to update the GUI on

2009-01-19 Thread Grzegorz Adam Hankiewicz
El 18/01/2009, a las 18:44, eliben escribió: Regarding my application. It's just a bunch of buttons, combo boxes and checkboxes that all disable and enable each other, with several possible configurations. The easiest approach in wxPython is to define "states" that are set by combinations