Re: [PyQt] C++ and embedded python, how to share gui thread?

2007-05-16 Thread Patrick Stinson
there is only one QApplication. Even in apps where you are writing a graphical plugin that will be used in a native event loop, you have to manage one QApplication instance. So, if your C++ app created a QApplication then you don't have to worry about it just create the PyQt widgets at will. This

Re: [PyQt] converting std::vector to PyList

2007-03-29 Thread Patrick Stinson
shall copy your code, and I shall use your code. On 3/27/07, Giovanni Bajo <[EMAIL PROTECTED]> wrote: On 3/27/2007 12:40 PM, Patrick Stinson wrote: > I've got a method in my C++ api that takes a std::vector & as an > argument and populates it to return a value. What would be

[PyQt] converting std::vector to PyList

2007-03-27 Thread Patrick Stinson
I've got a method in my C++ api that takes a std::vector & as an argument and populates it to return a value. What would be the easiest way to wrap this with sip? I'd like to use a python list if possible. I can easily re-write the function to return the vector if necessary. cheers -- Patrick Ki

[PyKDE] compile/link errors in latest (mac) snapshot

2007-02-14 Thread Patrick Stinson
I configured with "python configure.py -c" linking QtDesigner.so: /usr/bin/ld: can't locate file for: -lqpydesigner For some reason libqpydesigner is built in debug mode, so the file name is libqpydesigner_debug.a, and I get the following error. I got past it by creating a symlink without the "_

Re: [PyKDE] Re: embedding python widgets in C++ app

2007-01-29 Thread Patrick Stinson
On 1/29/07, David Boddie <[EMAIL PROTECTED]> wrote: On Monday 29 January 2007 21:46, Patrick Stinson wrote: > On 1/28/07, David Boddie <[EMAIL PROTECTED]> wrote: > > * It would be good if you could attach some kind of license to the code > > so that it's clear

Re: [PyKDE] Re: embedding python widgets in C++ app

2007-01-29 Thread Patrick Stinson
On 1/28/07, David Boddie <[EMAIL PROTECTED]> wrote: On Sat, 27 Jan 2007 14:12:49 -0900, Patrick Stinson wrote: > I mashed up a simple and dry reference for this procedure. I'm still > editing it a little... > > http://www.patrickkidd.com/pk/trac/wiki/EmbeddedPythonWidge

Re: [PyKDE] Re: embedding python widgets in C++ app

2007-01-27 Thread Patrick Stinson
I mashed up a simple and dry reference for this procedure. I'm still editing it a little... http://www.patrickkidd.com/pk/trac/wiki/EmbeddedPythonWidgets On 1/27/07, Phil Thompson <[EMAIL PROTECTED]> wrote: On Saturday 27 January 2007 6:38 pm, Patrick Stinson wrote: > Well,

Re: [PyKDE] Re: embedding python widgets in C++ app

2007-01-27 Thread Patrick Stinson
On 1/27/07, Phil Thompson <[EMAIL PROTECTED]> wrote: On Saturday 27 January 2007 6:38 pm, Patrick Stinson wrote: > Well, at the moment everything works (with the exception of the #undef > slots problem) with the python framework that ships with OS X Tiger, > and applying a patch m

Re: [PyKDE] Re: embedding python widgets in C++ app

2007-01-27 Thread Patrick Stinson
Well, at the moment everything works (with the exception of the #undef slots problem) with the python framework that ships with OS X Tiger, and applying a patch means *moving to* building a custom interpreter for us. Personally I was very excited about how nailed down and easy deployment of sip an

Re: [PyKDE] Re: embedding python widgets in C++ app

2007-01-26 Thread Patrick Stinson
this everytime they download a new version. Ideas? On 1/26/07, Patrick Stinson <[EMAIL PROTECTED]> wrote: then wouldn't the modulename in the sip file have to not be PyQt4.QtCore? I'll give it a shot in my cpp, then I'll try changing the module name in the sip file and re

[PyKDE] Re: embedding python widgets in C++ app

2007-01-25 Thread Patrick Stinson
My mail config was a little messed up, so I'm trying to manually continue this thread. David: I've copied your code almost exactly, and I'm getting seg faults in Py_CallObject after copying your call_function() from the web. The pyDict and callable pointers are both valid... any ideas? Phil: Why

Re: [PyKDE] embedding python widgets in C++ app

2007-01-23 Thread Patrick Stinson
", line 1, in ? ImportError: No module named PyQt4.QtCore It says in the python docs that the name set in the struct _inittab should match that passed to Py_InitModule, which in this case is PyQt4.QtCore. What am I forgetting? - Hide quoted text - On 1/22/07, Patrick Stinson <[EMAIL PROTEC

Re: [PyKDE] embedding python widgets in C++ app

2007-01-22 Thread Patrick Stinson
On 1/22/07, Phil Thompson <[EMAIL PROTECTED]> wrote: On Monday 22 January 2007 9:21 am, Patrick Stinson wrote: > oops, I think the title is backwards. I will send the author an email. > I am trying to embed a python widget in a C++ application, where he is > trying to access h

Re: [PyKDE] embedding python widgets in C++ app

2007-01-22 Thread Patrick Stinson
} else qWarning("error in _create return (%p)", sipPy); } else qWarning("error \"_create\" is not callable"); Py_DECREF(_create); } else qWarning("no attribute \&q

Re: [PyKDE] embedding python widgets in C++ app

2007-01-20 Thread Patrick Stinson
Bingo. thanks for that, I think that turtorial will help quite a bit. On Mon, 15 Jan 2007 07:51:28 -0800 "Patrick Stinson" wrote: I know I've seen info here and there about using python widgets in C++ apps, but I need a recap. So I've already got this great C++

Re: [PyKDE] embedding python widgets in C++ app

2007-01-19 Thread Patrick Stinson
at <[EMAIL PROTECTED]> wrote: On 19.01.07 00:34:23, Patrick Stinson wrote: > I know I've seen info here and there about using python widgets in C++ > apps, but I need a recap. > > So I've already got this great C++ app with an embedded interpreter > for scripting special app f

[PyKDE] embedding python widgets in C++ app

2007-01-19 Thread Patrick Stinson
I know I've seen info here and there about using python widgets in C++ apps, but I need a recap. So I've already got this great C++ app with an embedded interpreter for scripting special app functions. What do I need to do to write a widget in python and use it as a child in my C++ app? cheers

Re: [PyKDE] Re: python/qt "slots" clash

2007-01-16 Thread Patrick Stinson
sorry for the late reply - it's deadline time here... yes - it absolutely does. That is infact exactly what I told my other developers to do... On 1/16/07, Phil Thompson <[EMAIL PROTECTED]> wrote: On Wednesday 10 January 2007 10:55 pm, Patrick Stinson wrote: > sorry for the do

[PyKDE] embedding python widgets in C++ app

2007-01-15 Thread Patrick Stinson
I know I've seen info here and there about using python widgets in C++ apps, but I need a recap. So I've already got this great C++ app with an embedded interpreter for scripting special app functions. What do I need to do to write a widget in python and use it as a child in my C++ app? cheers

[PyKDE] python/qt "slots" clash

2007-01-10 Thread Patrick Stinson
There is a clash with the "slots" definition in (at least) python2.3 and the qt definition of "slots." Apparently this bug has been fixed in a later version of python, but I would like to avoid an upgrade at this point. The problem is solvable if you #undef slots before including any qt headers

[PyKDE] Re: python/qt "slots" clash

2007-01-10 Thread Patrick Stinson
sorry for the double-post, but FYI adding #undef slots to the top of all of the sip*.cpp makes that file compile just fine. This is not a solution though because those files are auto-generated by sip... On 1/10/07, Patrick Stinson <[EMAIL PROTECTED]> wrote: There is a clash with the

[PyKDE] python console widget

2006-12-20 Thread Patrick Stinson
Does anyone know of any C++ code for a python interactive console widget? I've embedded the interpreter and wrapped my app's engine in a python module, but now want to add a little console to it... -- Patrick Kidd Stinson http://www.patrickkidd.com/ http://pkaudio.sourceforge.net/ http://pksample

Re: [PyKDE] deploying universal binaries

2006-12-20 Thread Patrick Stinson
This will help. If you are building a universal sip binary (only on ppc? not sure) you need to run configure with this command line: (Phil, maybe you can take note to add a flag...) python configure.py -k CFLAGS+="-arch ppc -arch i386" LFLAGS+="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacO

[PyKDE] optimizing a sip configure.py

2006-12-19 Thread Patrick Stinson
Is there any way to set up a configure.py to only generate the C++ sources for sip files that have changed? I have added the C++ source files to an xcode project for static linking and running configure.py overwrites all of the C++ files every time, so I have to recompile the whole python module e

[PyKDE] integrating a sip module into qmake

2006-12-18 Thread Patrick Stinson
I have written a scripting interface for my C++ app using sip and some C++ code to initialize the python module and add an entry-point python object to interface with the app engine. All of that was really straight forward, so first off a big thanks to Phil. sip has come really a long way in the l

Re: Re: [PyKDE] sip crash on configure.py standard MacPython 2.3.5

2006-11-18 Thread Patrick Stinson
wow, I'd find more bugs if I new we could hold you to the payback! On 11/18/06, Phil Thompson <[EMAIL PROTECTED]> wrote: On Saturday 18 November 2006 10:17 am, Ulrich Berning wrote: > Phil Thompson schrieb: > >On Friday 17 November 2006 9:09 pm, Patrick Stinson wrote: &g

Re: Re: [PyKDE] problem with event filter?

2006-11-17 Thread Patrick Stinson
ahh yes. I suppose the semantics make more sens that way... On 11/17/06, David Boddie <[EMAIL PROTECTED]> wrote: On Fri, 17 Nov 2006 12:11:55 -0900, Patrick Stinson wrote: >Does QObject.eventFilter work as it is supposed to? My eventFilter >method never gets called, even after t

[PyKDE] sip crash on configure.py standard MacPython 2.3.5

2006-11-17 Thread Patrick Stinson
I thought I posted this once before, but I couldn't find it from searching, so... The latest sip snapshot crashed for me during configure.py from the latest PyQt4 snapshot on Tiger using the default python implementation. The C++ code was generated properly. Exception: EXC_BAD_ACCESS (0x0001) C

[PyKDE] problem with event filter?

2006-11-17 Thread Patrick Stinson
Does QObject.eventFilter work as it is supposed to? My eventFilter method never gets called, even after typing in the line edit... class SpinBox(QSpinBox): def __init__(self, parent=None): QSpinBox.__init__(self, parent) self.installEventFilter(self.lineEdit()) def eventFilte

Re: [PyKDE] QAbstractItemView Question

2006-11-16 Thread Patrick Stinson
As far as I can see there isn't any code that resets the selection model when the model's reset() method is called. There *is* some funky behavior with selection models continueing to store indexes that are no longer valid once the layout of the model changes, though. On 11/16/06, Matt Chambers <

Re: [PyKDE] deploying universal binaries

2006-11-13 Thread Patrick Stinson
But do I have to do that? Is it possible to just deploy a universal module built for the default 2.3?On 11/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:Hi,Quoting Patrick Stinson < [EMAIL PROTECTED]>:> I want to deploy my pyqt4 app on all ppc and i386 macs. I was jus

[PyKDE] deploying universal binaries

2006-11-13 Thread Patrick Stinson
I want to deploy my pyqt4 app on all ppc and i386 macs. I was just going to use BuildApplet that comes with OS to put together the app bundle, but I need all of the shared libraries to be universal binaries. I built qt as a universal binary, but I don't see a flag for building the sip and pyqt modu

[PyKDE] class MyStyle(QStyle): pass

2006-11-04 Thread Patrick Stinson
Are you only using paintEvent for your custom widget looks, or have you every subclassed QStyle? I'm wanting to do some prototyping in python but I'm getting some odd behavior (like scrollbars not moving) from the following, which worked fine in c++: class Style(QStyle):    def __init__(self, baseS

Re: Re: [PyKDE] camel/under style

2006-10-21 Thread Patrick Stinson
of my concept of 'style' disappeared when I started this commercial C++ project... On 10/21/06, Torsten Marek <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patrick Stinson schrieb: > pythonic purists use underscores and lowercase as described in the &g

[PyKDE] camel/under style

2006-10-19 Thread Patrick Stinson
pythonic purists use underscores and lowercase as described in the python style guide, qt/C++ people use camel casing to remain consistent with Qt. What do PyQt people use? -- Patrick Kidd Stinson http://www.patrickkidd.com/ http://pkaudio.sourceforge.net/ http://pksampler.sourceforge.net/ ___

[PyKDE] snapshot compile errors with qt-4.2.0 on OS X

2006-10-17 Thread Patrick Stinson
X11? huh? mework/Headers -F/usr/local/Trolltech/Qt-4.2.0-opensource-shared/lib -o sipQtGuipart0.o sipQtGuipart0.cpp sip/QtGui/qapplication.sip: In function 'sipWrapperType* sipSubClass_QApplication(void**)': sip/QtGui/qapplication.sip:202: error: 'sipName_QX11EmbedWidget' was not declared in this

Re: Re: [PyKDE] snapshot-20061008: Qt-4.1.4 compile error

2006-10-13 Thread Patrick Stinson
Do you have a button that you click to send that reply? It's like clock-work. On 10/13/06, Phil Thompson <[EMAIL PROTECTED]> wrote: On Tuesday 10 October 2006 2:26 pm, Patrick Stinson wrote: > Missing a Qt-4.2 conditional? > > > c++ -c -pipe -fPIC -Os -Wall -W -DQT_NO

[PyKDE] low-priority sip crash in latest snapshots.

2006-10-12 Thread Patrick Stinson
The latest sip snapshot crashed from configure.py in the latest sip and PyQt-snapshots, but the code seems to be generated ok. This backtrance may not gt you anywhere, but I thought I would post it anyway... Thread 0 Crashed: 0 libSystem.B.dylib 0x9000c5f8 __vfprintf + 6311 1 libSystem.B

Re: Re: [PyKDE] Conceptual issue: How to talk to a "running" QtGui.QApplication?

2006-10-11 Thread Patrick Stinson
there are lots of examples on the trolltech site as well. On 10/11/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 11.10.06 09:15:34, Johannes Graumann wrote: > Hello, > > As you may have notices, I'm really new to this and am perpetually confused ... my current confusion orbits around the fo

[PyKDE] snapshot-20061008: Qt-4.1.4 compile error

2006-10-10 Thread Patrick Stinson
Missing a Qt-4.2 conditional? c++ -c -pipe -fPIC -Os -Wall -W -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -I/usr/local/Trolltech/Qt-4.1.4/mkspecs/default -I/usr/local/Trolltech/Qt-4.1.4/include -I/usr/local/Trollte

Re: Re: [PyKDE] Using QGraphicsView from QT 4.2

2006-08-14 Thread Patrick Stinson
I've missed those consise, question-crushing list answers ever since I was hired to do Qt work in C++... the world needs pypy On 8/14/06, Phil Thompson <[EMAIL PROTECTED]> wrote: On Monday 14 August 2006 11:16 am, Göran Sandahl wrote: > Hi there, > > I'm wondering if there is any way to use the

Re: [PyKDE] Deleting an item from a QButtonGroup

2006-06-13 Thread Patrick Stinson
This doesn't solve your problem, but as a general rule I would recommend that you recycle widgets instead of deleting them. Hide and cache the widgets you want removed, and reuse and re-init them when you need them. But, there is a W_DestructiveClose (or similar) widget flag that deletes the widg

Re: [PyKDE] converting enum types

2006-06-09 Thread Patrick Stinson
On 6/8/06, Patrick Stinson <[EMAIL PROTECTED]> wrote: > > On 6/8/06, Phil Thompson <[EMAIL PROTECTED]> wrote: > > > On Thursday 08 June 2006 2:55 pm, Patrick Stinson wrote: > > > > It seems like everywhere that there is an enum value returned from a > > >

[PyKDE] QCoreApplication.setEventFilter

2006-06-08 Thread Patrick Stinson
This is sort of a duplicate of a post to qt-interest. Thanks I want to allow a child widget to receive all 'delete' key events, so it can delete what it has to delete. I feel like I'm shooting myself in the foot, and not approaching this correctly at all, so does anyone have a better idea for thi

Re: [PyKDE] converting enum types

2006-06-08 Thread Patrick Stinson
On 6/8/06, Phil Thompson <[EMAIL PROTECTED]> wrote: On Thursday 08 June 2006 2:55 pm, Patrick Stinson wrote: > It seems like everywhere that there is an enum value returned from a > function, like QInputEvent.modifiers(), you get a class defined by > pyqt. What is the idea behi

[PyKDE] converting enum types

2006-06-08 Thread Patrick Stinson
It seems like everywhere that there is an enum value returned from a function, like QInputEvent.modifiers(), you get a class defined by pyqt. What is the idea behind returning an object of this type instead of an int, and where do you need to construct one? I found the bitwise operators in the pyq

Re: [PyKDE] AttributeError in PyQt on WinXP

2006-06-01 Thread Patrick Stinson
def print_attrs(o): for i in o.__dict__.keys(): print i print_attrs(QApplication([])) On 5/31/06, Phil Thompson <[EMAIL PROTECTED]> wrote: On Thursday 01 June 2006 12:38 am, Rightful King wrote: > Hey all, > > Here is the code: > > import sys > from Qt import * > > a = QApplication([])

Re: [PyKDE] pysignals and Py_DECREF

2006-05-25 Thread Patrick Stinson
On 5/25/06, Phil Thompson <[EMAIL PROTECTED]> wrote: On Monday 22 May 2006 3:38 am, Patrick Stinson wrote: > I am trying to disconnect all of the signals that I connected to a > QObject in order to ensure that it is deleted. The following program > prints "Object::discon

Re: [PyKDE] need some help

2006-05-24 Thread Patrick Stinson
http://www.mingw.org/download.shtml#hdr2 - download current "make" package http://www.py2exe.org/ http://undefined.org/python/py2app.html On 5/21/06, Derek <[EMAIL PROTECTED]> wrote: HI, I am having some problems installing sip in windows. I cannot run make. Can you please help me out and tel

Re: [PyKDE] undefined symbol: QPrinter::setPrintRange

2006-05-23 Thread Patrick Stinson
announcement it is no suprise that any shared library using those two functions (like PyQt4) will compile correctly and fail on linking (like __import__('PyQt4')). On 5/23/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 22.05.06 20:52:28, Patrick Stinson wrote: > Didn't you

Re: [PyKDE] undefined symbol: QPrinter::setPrintRange

2006-05-22 Thread Patrick Stinson
Didn't you say that my example code didn't work for you? Any code that uses that function should not link with the library in question. On 5/22/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 22.05.06 16:33:04, Patrick Stinson wrote: > This happens because when you l

Re: [PyKDE] undefined symbol: QPrinter::setPrintRange

2006-05-22 Thread Patrick Stinson
as never linked into the library, therefore it is a problem with their build system, and has nothing to do with pyqt, and subsequently, Phil. On 5/22/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 22.05.06 14:36:54, Patrick Stinson wrote: > On 5/22/06, Patrick Stinson <[EMAIL P

Re: [PyKDE] undefined symbol: QPrinter::setPrintRange

2006-05-22 Thread Patrick Stinson
On 5/22/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 22.05.06 22:40:44, Phil Thompson wrote: > On Monday 22 May 2006 9:48 pm, Andreas Pakulat wrote: > > On 22.05.06 12:16:03, Patrick Stinson wrote: > > > yeah, this is TrollTech's problem. I find it hard to ima

Re: [PyKDE] undefined symbol: QPrinter::setPrintRange

2006-05-22 Thread Patrick Stinson
On 5/22/06, Patrick Stinson <[EMAIL PROTECTED]> wrote: Hmm. I don't find PyQt4 to even come into the picture here, as the following code shows the same error whne compiled w/o qt3 support. I'm just sticking with a full build for now. int main() { QPrinter *p; p->set

Re: [PyKDE] undefined symbol: QPrinter::setPrintRange

2006-05-22 Thread Patrick Stinson
yeah, this is TrollTech's problem. I find it hard to imagine that a stitch like -no-qt3support is broken in this ehemm...bugfix release. On 5/22/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 22.05.06 10:50:45, Patrick Stinson wrote: > qt-4.1.3 configured with "-

[PyKDE] undefined symbol: QPrinter::setPrintRange

2006-05-22 Thread Patrick Stinson
qt-4.1.3 configured with "-release -qt-gif -no-qt3support" c++ -c -pipe -fPIC -Os -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -I/usr/local/Trolltech/Qt-4.1.3/mkspecs/default -I/usr/local/Trolltech/Qt-4.1.3/incl

[PyKDE] pysignals and Py_DECREF

2006-05-21 Thread Patrick Stinson
I am trying to disconnect all of the signals that I connected to a QObject in order to ensure that it is deleted. The following program prints "Object::disconnect: No such signal QObject::bleh(QObject*)" if I uncomment the disconnect line, but also deletes the object when it is dereferenced. from

[PyKDE] Compile error in current snapshot (Qt-4.1.2)

2006-05-20 Thread Patrick Stinson
Didn't expect this one, but I'm trying with 4.1.3 [EMAIL PROTECTED] ~/Desktop/PyQt4-mac-gpl-snapshot-20060519 $ make c++ -c -pipe -fPIC -Os -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/usr/bin/../../System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -I/usr/local/Trolltech/Qt

[PyKDE] Re: QDrag.start, Py_BEGIN_ALLOW_THREADS

2006-05-18 Thread Patrick Stinson
re.py and extra sip options like this one, and on the performance hit gui apps may take from adding this option? cheers On 5/18/06, Patrick Stinson <[EMAIL PROTECTED]> wrote: Phil, I'm not sure what the implications of this are, but I'm assuming with great sorrow that there is no

[PyKDE] QDrag.start, Py_BEGIN_ALLOW_THREADS

2006-05-18 Thread Patrick Stinson
Phil, I'm not sure what the implications of this are, but I'm assuming with great sorrow that there is no way to safely release the GIL while dragging? I've got threads that need to continue to run while a call to QDrag.start is waiting to return, and I'm afraid this is a show-stopper for my app.

Re: [PyKDE] PyQt4

2006-05-12 Thread Patrick Stinson
On 5/12/06, Patrick Stinson <[EMAIL PROTECTED]> wrote: well, gentoo is meant to be a highly customizable distribution. The nice thing about gentoo is that you don't really *have* to customize everything. It is my opinion that the installation contains nothing out of the ordinary for t

Re: [PyKDE] PyQt4

2006-05-11 Thread Patrick Stinson
or just get gentoo On 5/11/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 11.05.06 22:45:56, Lee Braiden wrote: > On Thursday 11 May 2006 22:38, Andreas Pakulat wrote: > > I installed me python2.4 into $HOME and with it PyQt4+Qt4 as it's much > > easier to "update" (no need to su). > > Hmm.

Re: [PyKDE] PyQt4

2006-05-11 Thread Patrick Stinson
pnot ony is it stable, but you can get a system up and running using pyqt4 very fast, considering trolltech releases windows binaries on their site. I found the build to be very smooth using gcc4 on OS X, and although it required an intermediate step or too on my gentoo linux machine, the process

Re: [PyKDE] Porting from PyQt3 to PyQt4

2006-05-11 Thread Patrick Stinson
On 5/11/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: On 11.05.06 17:19:25, Frode Øijord wrote: > when porting from PyQt3 to PyQt4 will i have to rewrite all GUI code to the Qt4 > way of doing things? More to the point, I have subclassed a QListView and a > QListViewItem and I am wondering if I

Re: [PyKDE] ANN: PyQt 4.0beta1 Released

2006-04-27 Thread Patrick Stinson
yay! I don't even have to compile anything to get it to work on windows, what a relief. On 4/27/06, Phil Thompson <[EMAIL PROTECTED]> wrote: > At long last I am happy to announce the release of PyQt 4.0beta1, the Python > bindings for Qt v4. > > As well as source packages there is a Windows instal

Re: [PyKDE] Changed to uic API in PyQt4

2006-04-24 Thread Patrick Stinson
On 4/24/06, Phil Thompson <[EMAIL PROTECTED]> wrote: > Tonight's PyQt4 snapshot contains changes to the uic module. If you import any > of the uic functions then you will need to change your code. > > If you are just using pyuic4 then you shouldn't be affected. > > PyQt 4.0 beta will be released in

Re: [PyKDE] Python/pystate.c:441: failed assertion `autoInterpreterState'

2006-04-11 Thread Patrick Stinson
ok, It must be another extension (probably one of mine...) then. thanks. On 4/10/06, Phil Thompson <[EMAIL PROTECTED]> wrote: > On Tuesday 11 April 2006 1:04 am, Patrick Stinson wrote: > > I assume this is fixed, considering the age of the following post, but > > I got

Re: [PyKDE] QTimers on MacOSX?

2006-04-10 Thread Patrick Stinson
what is the exact error or errors you are getting? I would imagine that this is just an OS X thing than an intel/ppc thing. It seems easier to get those produce that error than it does to prevent it. On 4/10/06, Emanuele Santos <[EMAIL PROTECTED]> wrote: > Phil, > which mac and python version do

[PyKDE] Python/pystate.c:441: failed assertion `autoInterpreterState'

2006-04-10 Thread Patrick Stinson
I assume this is fixed, considering the age of the following post, but I got it again. What is the likelyhood that this is cause by some other c++ extension than PyQt4. (latest snapshots) On Monday 05 July 2004 16.54, Phil Thompson wrote: > On Monday 05 July 2004 3:09 pm, Fredrik Juhlin wrote: > >

[PyKDE] Qt4: QPainter.drawText

2006-04-10 Thread Patrick Stinson
I'm trying to draw some text within a bounding rectange, and am running into a problem with the polymorhpic nature of QPainter.drawText. I see: void drawText(const QPointF &p, const QString &s); void drawText(const QRectF &r, int flags, const QString &text, QRectF *br /Out/ = 0); void

Re: [PyKDE] PyQt4: setPaletteBackgroundColor

2006-03-28 Thread Patrick Stinson
this is interestin because the palette still doesn't propogate to the widgets' children. """ A common base class for all pk widgets. """ from PyQt4.QtGui import QFrame, QPalette class PKWidget(QFrame):     """ Conveinience class """     def set_background(self, color):     palette = QPalett

[PyKDE] QScrollArea visible widge area

2006-03-28 Thread Patrick Stinson
I have a widget in a scrollarea, and I want to get the current visible area of the widget while in the scrollarea. A QRect would be apprropriate.Any ideas? Thanks!-- Patrick Kidd Stinsonhttp://www.patrickkidd.com/http://pkaudio.sourceforge.net/ http://pksampler.sourceforge.net/

Re: [PyKDE] Re: QScrollBar, fixed width

2006-03-27 Thread Patrick Stinson
pass or something similar (I understand the work-in-progress, and maybe later bit...) On 3/27/06, Phil Thompson <[EMAIL PROTECTED]> wrote: On Wednesday 22 March 2006 8:02 pm, Patrick Stinson wrote:> I got a reply from qt-interest regarding this. What is the state of QStyle> sub-cla

[PyKDE] pksampler-0.4a

2006-03-25 Thread Patrick Stinson
I've finished the first release of pksampler in a year. Everything, even the dsp code is written in python, and as a result it is very stable. It only requires numarray, libsndfile, and PyQt4; the pksampler audio/midi Python C extensions are all included. If anyone installs it let me know what you

[PyKDE] strange seg fault with SIGNAL('PyObject *')

2006-03-22 Thread Patrick Stinson
I don't have debuggin symbols installed, but I am consistently getting a seg fault after calling the python slot connected to SIGNAL('PyObject *') from a QWidget subclass. I am usually passing a python string with the signal, but if I pass None instead, it doesn't crash. I have a button group emitt

[PyKDE] Re: QScrollBar, fixed width

2006-03-22 Thread Patrick Stinson
eOption *, const QWidget *pWidget = 0) const{if ( metric == PM_ScrollBarExtent ){ return SCROLLBARWIDTH}return QWindowsStyle::pixelMetric( metric, 0, pWidget ); }}- Then set the style to the Scrollbar in your code. => e.g. mystyle = new MyStyle(); verticalScrollBar()->setS

Re: [PyKDE] PyQt4 at ACCU Conference 2006

2006-03-17 Thread Patrick Stinson
I would have loved to have gone while I was at QMW in 2001-3. good luckOn 3/17/06, Phil Thompson <[EMAIL PROTECTED] > wrote:For those interested I will be giving a 90 minute talk on PyQt4 at the Python track of this year's ACCU conference in Oxford, UK.Details are at https://www.accu.org/conference

Re: [PyKDE] Qt 4.1.1: QTreeWidgetItemIterator

2006-03-10 Thread Patrick Stinson
bravo. I wasn't aware of metasip, but that's obviously a big step in the right direction.On 3/10/06, Phil Thompson < [EMAIL PROTECTED]> wrote:On Friday 10 March 2006 12:57 pm, Andreas Pakulat wrote: > On 10.03.06 05:24:20, Emanuele Santos wrote:> > I need to make faster updates in a QTreeWidget. Th

[PyKDE] exec("print pyqt4_users / float(pyqt_users)")

2006-03-10 Thread Patrick Stinson
I'm seeing a lot of pyqt4 users out there, and considering pyqt is more of a bleeding-edge project, I suppose I'm not suprised. How many of us are using qt3 and how many of us have (moved, started moving) to qt4? I'll bet most of the commercial people are still using qt3. -- Patrick Kidd Stinsonhtt

Re: [PyKDE] PyQt Qtable question

2006-03-03 Thread Patrick Stinson
post some code?On 3/3/06, Bowen, Brian M <[EMAIL PROTECTED]> wrote: Hi - I am having some trouble populating a Qtable with Qt 3.3. For smalltables, everything works fine. However, once the size of the tablebecomes larger than my screen, I can no longer populate some of thecells. The problematic cel

[PyKDE] QScrollBar, fixed width

2006-03-02 Thread Patrick Stinson
I am trying to set the width of a vertical scrollbar (or any for that matter) of a QScrollArea. I use PyQt4, kde-3.5.1, and the default plastic syle. The size prints 50 for each scrollbar, but the width does not change. Ideas? thanks in advance. from PyQt4.QtGui import * from PyQt4.QtCore import *

Re: [PyKDE] Dropping SIGNAL() and SLOT() in PyQt4?

2006-02-22 Thread Patrick Stinson
but once you start adding "optional" syntax its hard not to ask...On 2/19/06, Patrick Stinson <[EMAIL PROTECTED] > wrote:As I wrote to a friend recently, qt has always been more of a good interface than a chunk of unique functional code. IMO, the reason qt is so successful is that it def

Re: [PyKDE] Dropping SIGNAL() and SLOT() in PyQt4?

2006-02-19 Thread Patrick Stinson
As I wrote to a friend recently, qt has always been more of a good interface than a chunk of unique functional code. IMO, the reason qt is so successful is that it defines a standard way  to do all the usual stuff, and that makes our code easier to read, and easier to understand while writing it. f

Re: [PyKDE] PyKDE example app(s).. what do *you* have? :)

2006-02-15 Thread Patrick Stinson
It's only a matter of time before high-level programming like this will take off, IMHO. It still pains me to see someone waste there time with pre-compilation and syntax soup to write some of the new apps we see. My co-conspiritors and I have been pushing pyqt here and there in the commercial domai

[PyKDE] pksampler screenshots

2006-02-15 Thread Patrick Stinson
All pyqt (well, a little povray) https://svn.patrickkidd.com/pk/trac Everything is ported to pyqt4, and all pixmap and resource handling python is reusable. There is also pkrcc in the bin dir that makes a qt4 resource file from all pixmaps (or whatever) in current directory.-- Patrick Kidd Sti

Re: [PyKDE] Run program as root

2006-02-14 Thread Patrick Stinson
Even though this is more of a python question than a pykde question, #!/bin/sh # wrapper shell script sudo /path/to/python $@ On 2/13/06, Tina Isaksen <[EMAIL PROTECTED]> wrote: Noob question:As a learning project I'm making some system tool frontends for kde(using Qt), but for the life of me I

Re: [PyKDE] PyQt4: seg fault with QGradient

2006-02-13 Thread Patrick Stinson
I realize that that might not help your very much, sorry. If it works for you maybe its just my machine. that isn't a very functional way to use QGradient anyway, so maybe save that for later.On 2/13/06, Patrick Stinson <[EMAIL PROTECTED]> wrote: from PyQt4.QtGui import * b = QBrus

[PyKDE] Re: QEvent.User

2006-02-09 Thread Patrick Stinson
line 1, in ? TypeError: argument 1 of QEvent() has an invalid type >>>  On 2/9/06, Patrick Stinson <[EMAIL PROTECTED]> wrote: I show QEvent.User as Shouldn't it be PyQt4.QtCore.QEvent.Type?-- Patrick Kidd Stinson http://pkaudio.sourceforge.net/http://pksampler.sou

[PyKDE] QEvent.User

2006-02-09 Thread Patrick Stinson
I show QEvent.User as Shouldn't it be PyQt4.QtCore.QEvent.Type?-- Patrick Kidd Stinsonhttp://pkaudio.sourceforge.net/http://pksampler.sourceforge.net/ ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo

[PyKDE] python types as arguments toPyQt4 signals

2006-02-09 Thread Patrick Stinson
What is the proper way of writing a signal argument list for python types? Will it only work for basic types? What about types defined in c-extensions (I'm trying gst.Message). def on_emit(*arg):     print arg SIG = 'bleh(dict)' app = QApplication([]) QObject.connect(app, SIGNAL(SIG), on_emit) ap

Re: [PyKDE] PyQt4: setPaletteBackgroundColor

2006-02-09 Thread Patrick Stinson
I new it! that worked for meOn 2/8/06, V. Armando Sole <[EMAIL PROTECTED]> wrote: Hi Gerard,At 20:08 08/02/2006 +0100, Gerard Vermeulen wrote:>Please, read my mail again.  You are trying to do something which you>cannot do without a cast in C++, because QWidget::palette() returns >'const QPalette&'

Re: [PyKDE] PyQt4: setPaletteBackgroundColor

2006-02-08 Thread Patrick Stinson
do Sole <[EMAIL PROTECTED]> wrote: At 08:26 08/02/2006 -0900, Patrick Stinson wrote:>Yeah, I"m getting the same problem. If you set the role color for the>child widget, and set the role color for the parent widget, the child>widget just gets the color for the parent widget. Th

Re: [PyKDE] PyQt4: setPaletteBackgroundColor

2006-02-08 Thread Patrick Stinson
Yeah, I"m getting the same problem. If you set the role color for the child widget, and set the role color for the parent widget, the child widget just gets the color for the parent widget. This means that you can't give child widgets their own color. For example, the following code shows no red c

Re: [PyKDE] Popup window

2006-02-08 Thread Patrick Stinson
return QMessageBox.question(None, 'what?', 'what do you want?', QMessageBox.Yes, QMessageBox.No)On 2/7/06, Gudjon I. Gudjonsson < [EMAIL PROTECTED]> wrote:Hi   Sorry for the disturbion but I have spent a whole evening on looking for an example on how to make a pop-up window in pyqt. I just want to

Re: [PyKDE] PyQt4: setPaletteBackgroundColor

2006-02-07 Thread Patrick Stinson
I see. I read in the qt-4.1 docs that QPalette.Background is deprecated in favor of QPalette.Window. Comments?On 2/7/06, Gerard Vermeulen < [EMAIL PROTECTED]> wrote:On Tue, 7 Feb 2006 14:11:46 -0900 Patrick Stinson <[EMAIL PROTECTED]> wrote:> I relaize that this is a question for q

[PyKDE] PyQt4: seg fault with QGradient

2006-02-07 Thread Patrick Stinson
QBrush(QGradient()) seg faults.-- Patrick Kidd Stinsonhttp://pkaudio.sourceforge.net/http://pksampler.sourceforge.net/ ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] PyQt4: setPaletteBackgroundColor

2006-02-07 Thread Patrick Stinson
I relaize that this is a question for qt-interest, but I'm getting a slow response. What is the preferred method for setting the background color of a widget in qt4? I'm using palette().setColor(QPalette.Window, mycolor)), but this setting for child widgets seems to be overriden by the color you

[PyKDE] TypeError on emit()

2006-02-06 Thread Patrick Stinson
I'm trying to emit a custom python signal. in PyQt3, you just did self.emit(PYSIGNAL('moved'), (delta,)). Appearantly you have to specifiy an argument list with the new custom signals, and use SIGNAL(), so I did: Traceback (most recent call last):   File "/home/patrick/repos/pk/widgets/pixmapwidg

[PyKDE] configure.py: incorrect Error output

2006-02-04 Thread Patrick Stinson
I get the following error in the current snapshot: [EMAIL PROTECTED] ~/PyQt-x11-gpl-snapshot-20060126 $ python configure.py -l qt-mt -q /usr/qt/3 Error: These Qt libraries were found: qt qt-mt. Use the -l argument to explicitly specify which you want to use. because the correct flag is -y, not -l

[PyKDE] missing gcc include directive for PyQt4 snapshot

2006-02-02 Thread Patrick Stinson
the command line to compile pylupdate is missing an include directive pointing to the value of the QMAKESPEC env variable. My mkspec is linux-g++-64, but the command line has $QTDIR/mkspecs/linux-g++, which I have not specified anywhere. I have installed qt-4.1.0-r2 on gentoo. QMAKESPEC=/usr/share

  1   2   >