Re: [PyQt] explanatory label in a not uniformly scaled QGraphicsView

2011-02-09 Thread Jason H
I don't think the items know id they are scaled or not. And if they do, that way madness lies (for me anyway). Rather what I think you need is an item with an overlay functionality. You basically have a widget (Item) stack simultaneously display multiple indexes. When you scale, you only scale

Re: [PyQt] changing SVG group rendering color

2010-04-16 Thread Jason H
Qt does not support modifying SVG content (without modifying and reparsing the file) - Original Message From: John Ossenfort johnossenf...@yahoo.com To: pyqt@riverbankcomputing.com Sent: Thu, April 15, 2010 1:37:55 PM Subject: [PyQt] changing SVG group rendering color Hi list

Re: [PyQt] properly exiting application while still in init

2010-04-16 Thread Jason H
You can't if you're in the constructor. What you have to do, is have your constructor post an event to show or exit. I use a singleshot timer with a time of 0. This will post the event immediately after the constructor is done. - Original Message From: Sebastian Elsner

Re: [PyQt] Is there a way to run the interp AND a gui?

2010-03-04 Thread Jason H
Hah, I guess I am showing my old VB colors :-) This is freaking awesome! - Original Message From: Phil Thompson p...@riverbankcomputing.com To: Jason H scorp...@yahoo.com Cc: PyQt pyqt@riverbankcomputing.com Sent: Thu, March 4, 2010 3:58:56 AM Subject: Re: [PyQt] Is there a way

Re: [PyQt] Is there a way to run the interp AND a gui?

2010-03-03 Thread Jason H
. - Original Message From: Phil Thompson p...@riverbankcomputing.com To: Jason H scorp...@yahoo.com Cc: PyQt pyqt@riverbankcomputing.com Sent: Wed, March 3, 2010 3:21:07 AM Subject: Re: [PyQt] Is there a way to run the interp AND a gui? On Tue, 2 Mar 2010 15:04:37 -0800 (PST), Jason H scorp

[PyQt] Is there a way to run the interp AND a gui?

2010-03-02 Thread Jason H
I am working on the new Qt/Kinetic stuff and one thing I would really like to have is an interactive GUI for it. Ideally, I'd have something like the interactive interpreter, which when I type x=QGrahpicsTextItem(...) and add it to the scene, it appears in the scene. Then I can do that with

[PyQt] ScaleX, ScaleY

2010-01-29 Thread Jason H
Apparently only a single scale factor is supported. QGraphicsItem.setScale(qreal) The Qt API allows for independent X and Y scale factors. QGraphicsItem.setXScale(qreal) QGraphicsItem.setYScale(qreal) Can we get those supported? Thanks.

Re: [PyQt] ScaleX, ScaleY

2010-01-29 Thread Jason H
Confused... But now I get it. I searched on QGraphicsItem::setScale() then **some how** got to QGraphicsScale::setXScale() I thought it was a member of QGraphicsItem Sorry! - Original Message From: Phil Thompson p...@riverbankcomputing.com To: Jason H scorp...@yahoo.com Cc: pyqt

[PyQt] Simple connect error

2010-01-26 Thread Jason H
class Main(QGraphicsView): def __init__(self, useGL=False, parent=None): pass @pyqtSlot() def screenFinished(self): print Main.screenFinished class Screen(QObject): finished = pyqtSignal() def __init__(self, instanceName, main):

Re: [PyQt] Simple connect error

2010-01-26 Thread Jason H
- Original Message From: Andreas Pakulat ap...@gmx.de To: pyqt@riverbankcomputing.com Sent: Wed, January 27, 2010 1:17:48 AM Subject: Re: [PyQt] Simple connect error On 26.01.10 22:05:41, Jason H wrote: class Main(QGraphicsView): def __init__(self, useGL=False, parent=None

Re: [PyQt] Simple connect error

2010-01-26 Thread Jason H
**facepalm** I had a locally defined class that we overriding it. It was missing the slot. - Original Message From: Jason H scorp...@yahoo.com To: Andreas Pakulat ap...@gmx.de; pyqt@riverbankcomputing.com Sent: Wed, January 27, 2010 1:22:51 AM Subject: Re: [PyQt] Simple connect error

[PyQt] Timers

2010-01-25 Thread Jason H
I have a class that is created and needs to run a function after the event loop starts. Usually I just do: if __name__==__main__: a = QApplication(sys.argv) m=Main(False) m.show() QTimer.singleShot(0, m.startProcessing) a.exec_() But my startProcessing slot does not get

Re: [PyQt] QGraphicsPixmapItem not showing set pixmap

2010-01-19 Thread Jason H
Simply, your PNG does not exist. Try print QFile.exists('/.../.../pic1.png) Or You aren't looking at it. Try using ensureVisible() on it in case its off-screen. - Original Message From: dizou di_...@yahoo.com To: pyqt@riverbankcomputing.com Sent: Tue, January 19, 2010 12:23:19 PM

Re: [PyQt] Simple QGV crash

2009-12-22 Thread Jason H
a working PyQt snapshot previously. (12/09 i think) - Original Message From: Phil Thompson p...@riverbankcomputing.com To: Jason H scorp...@yahoo.com Cc: pyqt@riverbankcomputing.com Sent: Tue, December 22, 2009 11:54:30 AM Subject: Re: [PyQt] Simple QGV crash On Mon, 21 Dec 2009 18:18:11

[PyQt] Qt4.6 released... When will PyQt Support it?

2009-12-01 Thread Jason H
Well the announcement has come! I've been looking forward to 4.6 forever! So my question is naturally, when will I be able to use PyQt with it? Thanks! ___ PyQt mailing listPyQt@riverbankcomputing.com

Re: [PyQt] Qt4.6 released... When will PyQt Support it?

2009-12-01 Thread Jason H
will PyQt Support it? On Tuesday 01 December 2009 15:47:21 Jason H wrote: Well the announcement has come! I've been looking forward to 4.6 forever! So my question is naturally, when will I be able to use PyQt with it? As Qt tends to be binary compatible and PyQt isn't linked statically afaik

Re: [PyQt] QTimer.singleShot

2009-10-08 Thread Jason H
Subject: Re: [PyQt] QTimer.singleShot Jason H wrote: I have a GUI application and I want to trigger an event after my GUI starts: if __name__==__main__: a = QApplication(sys.argv) m=Main(False) m.show() a.exec_() I put QTimer.singleShot(0, self.start) after the m

Re: [PyQt] QTimer.singleShot

2009-10-08 Thread Jason H
Ok, to get it, try this: import pdb import sys from PyQt4 import QtCore, QtGui class MainWindow(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) QtCore.QTimer.singleShot(0, self.start) def start(self): pdb.set_trace() print

[PyQt] QTimer.singleShot

2009-10-06 Thread Jason H
I have a GUI application and I want to trigger an event after my GUI starts: if __name__==__main__: a = QApplication(sys.argv) m=Main(False) m.show() a.exec_() I put QTimer.singleShot(0, self.start) after the m __init__ialization, both in the class, and I also tried it

Re: [PyQt] GraphicsItem, QObject Inheritance problem

2009-10-01 Thread Jason H
/slots, which all operate on self.item ... It would be handy if these approaches were discussed in the docs. From: Brian Kelley kel...@eyesopen.com To: Jason H scorp...@yahoo.com Cc: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com Sent: Thursday, October 1

Re: [PyQt] GraphicsItem, QObject Inheritance problem

2009-10-01 Thread Jason H
__call__(self, args) and be able to transparently proxy them to the non-QObject object on the inside. It isn't true inheritance, but it would get the job done. Is there anything like this already? From: Brian Kelley kel...@eyesopen.com To: Jason H scorp

Re: [PyQt] Another connect problem

2009-10-01 Thread Jason H
job is not a member of the class (self.job) so it gets destroyed. - Original Message From: Thomas Olsen tang...@gmail.com To: pyqt@riverbankcomputing.com Sent: Thursday, October 1, 2009 2:09:21 PM Subject: [PyQt] Another connect problem Hi This is actually PyKDE4 related but the

Re: [PyQt] Another connect problem

2009-10-01 Thread Jason H
instance around. - Original Message From: Thomas Olsen tang...@gmail.com To: pyqt@riverbankcomputing.com; Jason H scorp...@yahoo.com Sent: Thursday, October 1, 2009 2:46:48 PM Subject: Re: [PyQt] Another connect problem On Thursday 01 October 2009 20:22:00 Jason H wrote: job

[PyQt] GraphicsItem, QObject Inheritance problem

2009-09-30 Thread Jason H
I am working on a hacked PyQt to play with the new animation features. So this isn't entirely kosher, however. I have the following: class AffineItem(QGraphicsItem): def __init__(self, ..., parent): QGraphicsItem.__init__(self, parent) class WrappedAffineItem(QObject,

Re: [PyQt] DragNDrop on Microsoft Windows.

2009-09-18 Thread Jason H
I don't know why it would be different. I did DnD from Firefox to Qt, but without the Python in the middle. I don't know what would change that would make it not work. From: LIM Fung-Chai lim.fung.c...@gmail.com To: pyqt@riverbankcomputing.com Sent: Friday,

Re: [PyQt] QObject: Cannot create children for a parent that is in a different thread. How to edit another threads objects?

2009-09-14 Thread Jason H
Qt can pass its fundamental types across threads - and use them in signals/slots. You can only access/manipulate GUI elements in the main thread. Use a signal/slot between the two threads and have the slot in the main thread update the GUI. Your line for the *** line should be an emit.

Re: [PyQt] image tool like paint

2009-08-18 Thread Jason H
It is relatively easy. You need a QWidget-detived widget that will collect mouse up/down events and store pixel data. Color is set by setting a pen via a toolbar. After that you can incorporate zoom/scaling and additional tools. Some of the questions though are do you want it to be raster (as

Re: [PyQt] Fade effect a widget on top of another widget

2009-08-18 Thread Jason H
The fader widget is limited. What you really want to do is create a parent QWidget or QStackedWidget subclass and have it call render() on both widgets, then fade with one on top of the other with the one being faded to on the bottom (by decreasding the opacity of the top) until it is complete

Re: [PyQt] Fade effect a widget on top of another widget

2009-08-18 Thread Jason H
That is for a cross fade. You could always fade to empty then fade out. I would probably do something like that for a cross fade. The fader widget appears to do a different kind of fade. The only difference is it is a fade against a solid color. You could create the Pixmap, repsecting the

Re: [PyQt] PyQt v4.6 and SIP v4.9 Snapshots

2009-08-10 Thread Jason H
configure.py -p win32-g++ mingw32-make ... makefile:26: warning: ignoring old commands for target `.c.o' g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -shared -Wl,-subsystem,console -Wl,-s -o sip.pyd siplib.o apiversions.o descriptors.o qtlib.o

Re: [PyQt] why pyqt can't creat code

2009-08-07 Thread Jason H
.../.\uic is not a valid path. From: caothucodon 123 caothucodon...@gmail.com To: PyQt@riverbankcomputing.com Sent: Friday, August 7, 2009 5:50:31 PM Subject: [PyQt] why pyqt can't creat code when i chose view code then it show dailog code genneration faild

Re: [PyQt] Stream Video

2009-08-06 Thread Jason H
Not a PyQt issue But I am an enabler. FFMPEG. From: Marcus TenĂ³rio. mart...@gmail.com To: pyqt@riverbankcomputing.com Sent: Thursday, August 6, 2009 4:17:57 PM Subject: [PyQt] Stream Video Anybody nows how to do this? -- Marcus TenĂ³rio And I Know, even as

Re: [PyQt] Printing a widget

2009-07-31 Thread Jason H
Check labs.trolltech.com They recently (since 4.5's release) had an article about improving rendering on higher DPI screens. Me thinks this would give you clues. - Original Message From: Robert J. Hansen r...@sixdemonbag.org To: Jason H scorp...@yahoo.com Cc: pyqt

Re: [PyQt] Make widget look disabled

2009-07-31 Thread Jason H
What in the world you are trying to do? I seriously question your logic... And it's not a PyQt question. But what about setting the stylesheet to match a disabled one? From: Anita Westman awest...@evertz.com To: PyQt@riverbankcomputing.com Sent: Friday,

Re: [PyQt] Make widget look disabled

2009-07-31 Thread Jason H
Why wouldn't you what to just use up/down (tristate) buttons? You can set a widget to get mouse events even when the mouse is not down, but I do not know if the enabling changes that. From: Anita Westman awest...@evertz.com To: Jason H scorp...@yahoo.com

Re: [PyQt] Printing a widget

2009-07-30 Thread Jason H
Are you accounting for the higher DPI of printers (300, 600) vs that of the screen (72 or 90)? You'll need to scale accordingly. - Original Message From: Robert J. Hansen r...@sixdemonbag.org To: pyqt@riverbankcomputing.com Sent: Thursday, July 30, 2009 1:58:59 PM Subject: [PyQt]

Re: [PyQt] Menu Item Opening Web Page?

2009-07-29 Thread Jason H
I think this is a general Qt question... So maybe try the regular Qt channel/list But I believe the class you want is QDesktopServices - Original Message From: Brent Villalobos brent.villalo...@pdi.dreamworks.com To: pyqt@riverbankcomputing.com pyqt@riverbankcomputing.com Sent:

Re: [PyQt] PyQt without X11

2009-07-29 Thread Jason H
Without X11, or Windows, or some other graphics system, there is no QPaintDevice for you to draw anything with. If you really don't have a display, you'd nee dot use a virtual frame buffer of the same quality as you'd expect to capture, that is XxY and Zbpp. All the widgets expect some kind

[PyQt] TypeError: unable to convert a QVariant

2009-07-23 Thread Jason H
TypeError: unable to convert a QVariant of type 6 to a QMetaType of type 12738896 I have that error message. I have python-defined class that provides a property as: class X (QObject): xScale = pyqtProperty(double, getScaleX, setScaleX) then Qt tries to update the property

[PyQt] qt_set_sequence_auto_mnemonic

2009-07-20 Thread Jason H
Is anyone else getting this with the latest snapshot? sipQtGuicmodule.o:sipQtGuicmodule.cpp:(.text+0x132fa): undefined reference to `qt_set_sequence_auto_mnemonic(bool)' collect2: ld returned 1 exit status platform = win32-g++ ___ PyQt

Re: [PyQt] GUI freezing when running large function in QThread

2009-07-20 Thread Jason H
This sounds like the GIL. Separate the validation to another process, not another thread. Use non-blocking io (Qt's default) do get yoru GUI responsive again. - Original Message From: Brent Villalobos brent.villalo...@pdi.dreamworks.com To: pyqt@riverbankcomputing.com

Re: [PyQt] Small paid development task

2009-07-15 Thread Jason H
Well no one jumped at my offer. I am curious, what would it take? - Original Message From: Jason H scorp...@yahoo.com To: pyqt@riverbankcomputing.com Sent: Tuesday, July 14, 2009 4:58:29 PM Subject: [PyQt] Small paid development task I mentioned last week that I was looking to get

[PyQt] Small paid development task

2009-07-14 Thread Jason H
I mentioned last week that I was looking to get some of the Kinetic project's bindings into PyQt. Unfortunately, it is going slow, and my time has had me working things where I am more productive. I am now offering anyone up to $200US via paypal to get these patched into the latest PyQt 4.5.2

Re: [PyQt] QMatrix transformations in QGraphicsView

2009-07-13 Thread Jason H
Well, with the upcoming animation classes, (which I am still looking for help with) You'd best make a small proxy class/API to handle the things that would transform its matrix. Ideally, you would expose these as properties for use with QPropertyAnimation. The proxy class holds all the

Re: [PyQt] memory can't be read

2009-07-10 Thread Jason H
There is a pointer that is referencing something outside of the address space of your program. Its a bad pointer. Since you are closing your program, that means your destructors are being called, memory freed. Likely, you have stored a pointer to a freed block and are trying to use it. perhaps

[PyQt] SIP/Kinetic task

2009-07-09 Thread Jason H
I have some immediate need to test to see if PyQt will be able to satisfy my needs. I have tried QtScript first, but that turns out not to be able to share QtScript-generated objects with the C++ side (even if derived from QObject). The new animation stuff is in Qt master branch, and the

Re: [PyQt] Qt and mysql

2007-08-24 Thread Jason H
Don't you have to fetch a row or something first? I believe in Qt the record pointer is positioned BEFORE the first record so you have to fetchNext() to get the first one. I ended up using the python API for my database work... - Original Message From: Martin Alderete [EMAIL

[PyQt] QGraphicsScene issue

2007-08-10 Thread Jason H
I started using Qt 4.3.1 and PyQt 4.3. When I added the QGraphicsScene, I got the error: QObject::startTimer: timers cannot be started from another thread With out me actually using any timers. Then I wrote the script below (Change sups.jpg) to another file you have on your system. Everytime it