[PyQt] Asynchronous QSound.isAvailable()?

2010-03-15 Thread Sundance
Greetings all, I'm having a problem I don't know how to address. Just plain completely at a loss. The issue: on Linux, when the NAS sound server isn't installed (which is the case on most distros nowadays), QSound.isAvailable() blocks for several seconds before returning. Since it runs in the

Re: [PyQt] More QPlainTextEdit weirdness! (was: Missing scrollbar signal...)

2009-12-16 Thread Sundance
On Friday 11 December 2009 14:04:41 Henning Schröder wrote: > Have you tried plaintext_edit.document().documentLayout().draw(paint, > context) ? Thanks! Actually, I have since switched to the use of QAbstractTextDocumentLayout.draw(), because unlike QTextDocument.drawContents() it can paint th

[PyQt] More QPlainTextEdit weirdness! (was: Missing scrollbar signal...)

2009-12-11 Thread Sundance
On Friday 11 December 2009 07:28:27 Henning Schröder wrote: > I have looked at the source of QPlainTextEdit and QTextEdit. Actually the > implementations are not consistent. > QPlainTextEdit calls verticalBar.blockSignals(True) before it call setValue > which would otherwise emit valueChanged. Hi

[PyQt] Missing scrollbar signal in QPlainTextEdit?

2009-12-10 Thread Sundance
Hi peeps, I'm playing around with QPlainTextEdit and having the weirdest bug. In my application, I've got keyboard shortcuts to scroll the TextEdit up and down by way of the QScrollBar.triggerAction() method, with arguments of SliderPageStepSub and SliderPageStepAdd respectively. I also need t

[PyQt] QtWebKit to PDF rendering

2009-09-23 Thread Sundance
Dominic Jacobssen wrote: > Anyway, I've attached my efforts, and I'd greatly appreciate any > guidance or prodding in the right direction. Hi Dominic, hi all, Attached herein is a version that works by sizing the PDF page correctly. (Also the URL and destination file are command line arguments

Re: [PyQt] Problems with QSystemTrayIcon

2009-02-19 Thread Sundance
Philippe Fremy wrote: > I am having problem to get QSystemTrayIcon to work. I am running on > windows XP and I never see any notification messages. > > My setup: windows XP, PyQt 4.3.3, python 2.5 Hi Philippe, Your code looks fine to me, and works fine here on Linux (Qt 4.4.3, PyQt 4.4.4). Acc

Re: [PyQt] LGPL license.

2009-02-12 Thread Sundance
Giovanni Bajo wrote: > You're basically restating your previous point, without debating mine. > The language choice affects companies much more than £350 / > programmer. Hi Giovanni, hi Phil, hi everybody, Giovanni, I'm... a bit uncomfortable writing this because I generally agree with you, and

Re: [PyQt] Dialogue box with hyperlink

2009-01-28 Thread Sundance
Geert Vancompernolle wrote: > Has anyone somewhere an example code of a small dialogue box which > contains a hyperlink to a web site? http://spyrit.svn.sourceforge.net/viewvc/spyrit/trunk/AboutDialog.py?revision=187&view=markup Basically, you use a QLabel that contains your link in HTML, and do

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

2009-01-07 Thread Sundance
Adeodato Simó wrote: >If you see in the middle of a program hex_(foo), you may wonder where >that came from, whereas qhex(foo) is going to be rather obvious. Greetings all, Might I humbly second this motion? I do understand the usual reservations about star-imports (being the kind of guy that o

[PyQt] Re: Python frame never dies on application errors

2008-12-10 Thread Sundance
Fabio Menegazzo wrote: > Consider a widget in the display. When an exception happens the Python > frame never dies. Am I doing something wrong? Hi Fabio, In your example, your exception occurs while the frame for SlotRaiseError() is still on the stack. The traceback thus keeps a pointer to tha

Re: [PyQt] Re: PyQt4 and Python 3.0

2008-10-07 Thread Sundance
Henrik Pauli wrote: >> And we could have just as many Viper versions as we'd damn well >> please within any given Python and Qt release timeframe -- we'd >> simply import from Viper2, Viper3... rather than Viper. > > Hmmm, true that, but since Py2 and Py3 are completely different > matters (as far

Re: [PyQt] Re: PyQt4 and Python 3.0

2008-10-07 Thread Sundance
Phil Thompson wrote: > Regarding numbering, my current thinking is... > > from PyQt4 import QtCore2, QtGui2 Hi all, I would like to go out on a limb and share a few thoughts that came to me with you guys. Essentially, the name of PyQt4 seems to carry some embedded confusion, in particular ab

Re: [PyQt] QWidget event == no more GC for QWidget?

2008-07-22 Thread Sundance
Alexei Puzikov wrote: > Hello, > > Quick question: if I uncomment the moveEvent in the code below, the > destructor isn't called anymore. > I suspect I'm doing something wrong or missing something - anybody can > clear the things up? I think this is the same issue as was discussed here a while ba

Re: [PyQt] Memory leak

2008-07-04 Thread Sundance
Giovanni Bajo wrote: > The assert triggers, meaning that the object of type MyWidget is not > released. Hi Giovanni, Yes, this is a known bug: SIP keeps a hard reference to bound methods in its method cache (the bound method being ws.sizeHint in your example). Since bound methods keep a refere

Re: [PyQt] Re: Virtual methods and an extra reference

2008-06-23 Thread Sundance
Phil wrote: > I will look at this properly when I have the time. Thank you, Phil -- it's appreciated. In the meanwhile, for those who may come across this thread in the future, here's a working workaround (as opposed to the almost-working- but-not-quite one from earlier *g*): 1) Rename the pro

[PyQt] Re: Virtual methods and an extra reference

2008-06-20 Thread Sundance
Kevin wrote: > Obviously the usage of the above bound_ref is just for bound > methods--but I think using new.instancemethod is more correct than > lazily grabbing the bound method with getattr. Hi Kevin, I like the use of new.instancemethod. I like it a /lot/. However: I notice that your code i

Re: [PyQt] Virtual methods and an extra reference

2008-06-19 Thread Sundance
Kevin Watters wrote: > I'm tracking down a memory leak in my app--and I think it's boiling > down to a virtual method on one of my classes that has an extra > reference, one not coming from any Python object. Hi Kevin, hi Phil, hi all, Okay, Kevin, you MUST be reading my mind because, first thin

[PyQt] Can I create more than one instance of a class?

2008-06-18 Thread Sundance
Hi Adonay, > Hi, I'm programing a little app which needs to open more than one > time, the same window. > Now I make an import and instance the window like this. > > from new_window import * Bad idea. As a rule of thumb, you don't want to use 'import *' when you can avoid it. It's okay while you

[PyQt] KDE Plasmoids in Python

2008-04-14 Thread Sundance
Greetings, good folks of various sizes and shapes, Has anyone, and I'm especially turning to our fine PyKDE people here, successfully gotten a Python Plasmoid (applet, data engine, runner, whichever) to work in KDE 4, either 4.0 or in trunk? I have been looking into it and generally remained ba

[PyQt] Handling the uncaught exceptions

2008-01-25 Thread Sundance
Hi Peter, > Is there a way to handle the uncaught exceptions that happen in PyQt? Yup: install your own exception handler in sys.excepthook. You'll find a somewhat fancy exception handler I wrote a while back as the handle_exception() function (starting line 146) in this file: http://spyrit.svn

[PyQt] Message boxes or OSD

2007-11-21 Thread Sundance
Nahuel wrote: > I wonder if I could make nice notifications similar to kdialog's or > maybe something like amarok osd. Hi Nahuel, I'd make it a custom QWidget with the FramelessWindowHint flag. I refer you to the 'Shaped Clock' example of the Qt documentation: http://doc.trolltech.com/4.3/widge

Re: [PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-10-16 Thread Sundance
Hi Detlev, Okay, I can't reproduce the issue you're describing (although I have an idea what causes it). May I ask you to give me a simple test case and, if at all possible, a traceback? Thanks! As for my email, things have been progressing at last, only to see new hurdles surface, joy. I'll s

Re: [PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-10-09 Thread Sundance
Sundance wrote: > As time allows, yes, with pleasure. No promise about how successful > it's gonna be, though, seeing as we're talking badass advanced snake > charming here; we'll see how that goes. ... Ookay. This was even worse than I imagined, but I'm done a

Re: [PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-10-02 Thread Sundance
Detlev wrote: > Actually it is not a minor issue. If possible I would try the import > hook approach. Would you take this task? Hi Detlev, As time allows, yes, with pleasure. No promise about how successful it's gonna be, though, seeing as we're talking badass advanced snake charming here; we'

Re: [PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-10-01 Thread Sundance
Detlev wrote: > Over here it failed to start the debug client because of an > ImportError. It cannot find the file, if the long import is given. Hi Detlev, I worked on it over the weekend on a different flavour of Linux, and I noticed the same issue you do. Apparently different distros package

Re: [PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-09-28 Thread Sundance
Detlev wrote: > Your fix doesn't work over here. It seems, that there is more about > it. Aw crap. :) What version of Eric is it, running on what version of Python, and what's the problem: does the fix cause it to not work in a different way, or does it just fail to fix the problem I reported?

Re: [PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-09-27 Thread Sundance
Detlev wrote: > You are right! And here are instructions for fixing it. Hi Detlev, Awesome! Thank you for this! Don't we risk bumping into the very same problem if somebody ever tries to run something with a DebugConfig module in Eric though? In that spirit, I think I've found a more robust f

Re: [PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-09-26 Thread Sundance
Detlev Offenbach wrote: > That is strange. eric puts the path of the executable at sys.path[0] > just before it's own path. Can you check sys.path in your main > routine or just before the failing import? Hi Detlev, Thank you for your reply! I did check sys.path just before the failing import.

[PyQt] Eric3 issue: importing modules with the same name as an Eric module

2007-09-25 Thread Sundance
Hi peeps, I am trying to run a Python/Qt4 project in Eric3. The project has a file called Config.py. When I try to run the project from the Eric3 interface, it fails, because the line 'import Config' in my code imports the Config module from Eric3 instead, even though my project directory come

Re: [PyQt] Re: Note about setting setting painters with gradients instead of brushes

2007-09-04 Thread Sundance
Phil Thompson wrote: > I've already said that you need PyQt 4.2 or later. Blargh, you're right -- sorry! -- S. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Re: Note about setting setting painters with gradients instead of brushes

2007-09-04 Thread Sundance
Phil Thompson wrote: > Works fine for me. Doesn't work for me though: [EMAIL PROTECTED]:~$ python test.py no workaround Traceback (most recent call last): File "test.py", line 49, in paintEvent painter.setBrush(g) TypeError: argument 1 of QPainter.setBrush() has an invalid type QPaintEngin

Re: [PyQt] About keyPressEvent

2007-08-23 Thread Sundance
Gustavo A. Dí­az wrote: > But this method is applied when you have a Menu bar right? No. This method is applied when you add an action to a QWidget, as I said in my previous email. It just so happens that if the QWidget is a menu or a toolbar, Qt creates a menu entry or a toolbutton, respectiv

Re: [PyQt] About keyPressEvent

2007-08-22 Thread Sundance
Gustavo A. Dí­az wrote: > As i said, only Escape key. > > I want to know to do the same but with alt + Escape... or which > is the way to do it... Hi Gustavo, I am not sure I understand what it is that gives you trouble here. Is it that you don't know how to go about it, or is it that it do

Re: [PyQt] PyQt v4.3a1 Binary Installer for Windows

2007-06-25 Thread Sundance
Giovanni wrote: > It wasn't a PyInstaller mode, it was just a way of compiling PyQt. I > spoke of this to Phil and he agreed to implement it directly within > SIP/PyQt. The above installer is the result of his work. Oh, THANK YOU for this, Giovanni, Phil. I've long wished for a way to package Py

Re: [PyQt] PyQt v4.3a1 Binary Installer for Windows

2007-06-25 Thread Sundance
Phil wrote: > I've created a binary Windows installer for what will be PyQt v4.3 at > http://www.riverbankcomputing.com/Downloads/PyQt4/GPL/PyQt-gpl-4.3a1-Py2.5.exe Oh, wonderful! Thank you Phil, this will make deploying stuff on Windows that much easier. :) Speaking of which, Giovanni -- if I

[PyQt] Exception handling hook

2007-05-23 Thread Sundance
Arve Knudsen wrote: > If an exception is raised in the last Python > layer, it is swallowed by the excepthook and a nice message box pops > up, BUT once control returns to the first Python layer Hi again, In my opinion, the exception hook should never even return. That's what I meant when I sai

[PyQt] Exception handling hook

2007-05-23 Thread Sundance
Arve Knudsen wrote: > Is it possible to register a hook with QApplication in order to be > notified of an unhandled exception? Hi Arve, Exceptions live in the Python realm, so they have nothing to do with QApplication as far as I know. You can install an exception handler with sys.excepthook.

[PyKDE] Deleting a layout in PyQt as opposed to Qt...

2007-02-28 Thread Sundance
Hi peeps, The Qt documentation informs us that the proper way to replace the layout on a widget is to first delete the current layout and then install a new one. Setting a new layout before the previous one is deleted won't work. All fine and dandy. The C++ syntax for removing a widget's layou

Re: [PyKDE] Eric 3.9 reopen last project

2006-05-22 Thread Sundance
I heard Andreas Pakulat said: > > The last project should be the topmost entry. > > Seems I should've added: automatically upon startup :-) Please don't! :) Some can have several ongoing projects at once and don't necessarily want to work on the last one opened when they fire up Eric3. However

Re: [PyKDE] PyQt4 compilation failure: location of specs?

2006-04-14 Thread Sundance
I heard Phil Thompson said: > Should be fixed in tonight's SIP and PyQt4 snapshots. Unfortunately > this means that there will be a SIP 4.4.2 when PyQt4 is released. Hi Phil, I am sorry to report that I tried SIP and PyQt4 snapshots of 2006/04/08, and there seemed to be the same problem. Should

Re: [PyKDE] PyQt4 compilation failure: location of specs?

2006-04-05 Thread Sundance
I heard Phil Thompson said: > Tonight's PyQt4 snapshot gets the various Qt directories from > QLibraryInfo rather than assuming a standard layout. Phil, Everything is configured and compiles fine except pylupdate, which fails to include the correct mkspecs directory. The INCPATH is set correct

Re: [PyKDE] Sugestions for PyQt4

2006-03-21 Thread Sundance
I heard Giovanni Bajo said: > As I said elsewhere, I believe this kind of improvements belongs to a > separate wrapper, such as PyPyQt built on top of PyQt. Others would > prefer a PyQt compilation switch or something like that. Hello Giovanni, I'd cast my vote in favor of a wrapper. I think we

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 03:15:45PM +, Phil Thompson wrote: > I like it - except I would use "Qt" rather than "qt". In fact I > really, really like it. Ditto! Giovanni, say: would that also remove the drawback from your awesome static PyQt module project? I looked into the issue of distribut

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 02:58:18PM +, Phil Thompson wrote: > What you describe can be implemented, but it means that the Qt module > must be linked against the Core and Gui Qt libraries. Oookay, you've lost me there. I thought that, with the exception of convertFromPlainText(), escape() and

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 02:01:35PM +, Phil Thompson wrote: > As I said in another reply - I don't see the difference. Whether it's > PyQt4.Qt rather than PyQt4.QtCore.Qt, the magic still has to happen > when you import QtGui. Well, I think the idea is that the Qt namespace would contain every

Re: [PyKDE] sip searchs incorrectly for qmail specs

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 12:33:23PM +0100, Andreas Pakulat wrote: > Right and that was caused by you not setting the QTDIR variable > properly. QTDIR should point to /usr/share/qt not /usr. Actually, I understand that Qt 4 doesn't use $QTDIR anymore, so I imagine that sooner or later the PyQt bui

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
Giovanni Bajo wrote: > This would be *very* confusing and very implicit. I'm -1000 on this. Actually, it's more than merely implicit: it's Plain Freaking Magic. And magic is dangerous. I agree that making the Qt namespace a module of its own would be one darn lot better. What I don't know is wh

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 10:41:45AM +, Phil Thompson wrote: > A C++ namespace doesn't have an implementation, it just contributes to > name mangling. In Python they have to be implemented by something so > there is no direct comparison. Point! Although I feel Giovanni does have a point as well

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Sundance
On Thu, Mar 02, 2006 at 09:46:03AM +, Phil Thompson wrote: > The short answer is that the Python objects are placed in the module > corresponding to the C++ library in which they are implemented. Hmm, meaning that this: ---[ Code snippet ]

Re: [PyKDE] What little detail am I missing?

2006-02-09 Thread Sundance
I heard Tina Isaksen said: > Well, I have been doing that for quite a while actually and can > pretty much do what I want. And maybe that is the problem... I do > stuff 'the wrong way'... Hello Tina, I'd say there are two important things there: 1) Figuring out just what you're doing wrong; 2) F

Re: [PyKDE] PyQt4 Status Update

2005-11-15 Thread Sundance
I heard Phil Thompson said: > I hope to have the remaining modules complete by the end of the year. > This might depend on the release of Qt 4.1. pyuic and QScintilla may > take a little longer. > > Testing so far is virtually non-existant. Hello Phil, Do you think it would be possible to make i

Re: [PyKDE] unicode two-way conversion

2005-10-25 Thread Sundance
I heard Sebastian Kügler said: > So what I basically need is a two-way conversion between unicode > strings and ascii (or at least something that is easily usable > together with psycopg and postgres' character fields. Hello Sebastian, You most probably want to read this: http://www.joelonsoftwa

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-20 Thread Sundance
I heard Mike Tammerman said: > I don't know how difficult or feasible it is, but I would suggest > using macros, so people can choose whether to use QString or python > str while compiling pyqt. Please, no! If we do that, we'll never be able to release a PyQt program and be certain it'll work o

Re: [PyKDE] Re: QString in PyQt4 - Request for Comments

2005-10-19 Thread Sundance
I heard Michael Thompson said: > No, the goal should be to work away at making QString interacted with > str/unicode more invisibly/naturally - where possible. Yeah, I'd sort of second that. The 'pythonic' way is pretty much duck typing, I think, in this sort of situation. How difficult would i

Re: [PyKDE] Static member functions

2004-12-14 Thread Sundance
I heard Hihn, Jason said: > Ok, my problem is that I want to provide some function that is called > by the widget that generates the signal. I'm not sure I fully get your problem, I'm afraid (I'm a bit slow like that), but: http://doc.trolltech.com/qq/qq10-signalmapper.html Would this help? -

Re: [PyKDE] Static member functions

2004-12-13 Thread Sundance
I heard Hihn, Jason said: > How can I do this in python? It may be I'm not getting your question, but... What's the problem exactly? You can have global objects (which includes functions) all you want, really. Example: ---[ globalstuff.py ]-- da

Re: [PyKDE] Using custom components and Qt Designer with QWidgetFactory in PyQt

2004-11-03 Thread Sundance
I heard Truls A. Tangstad said: > Maybe a possible solution might be to create a QWidgetFactory > replacement that runtime uses pyuic and execs the result... if > nothing else this allows custom components specified in the Designer > to be created correctly since pyuic uses code from the Comments

Re: [PyKDE] Help with simple clipboard examples

2004-10-27 Thread Sundance
I heard Stephen Boulet said: > I just want to have a module to use under linux that would let me get > and set the clipboard Your previously posted code should work fine for this purpose. Just take the imports out of the functions. -- S. ___ PyKDE ma

Re: [PyKDE] Help with simple clipboard examples

2004-10-27 Thread Sundance
I heard Stephen Boulet said: > I'd like to get and set the X-window clipboard for some short > scripts, but I'm not doing it quite right. Can someone help me along? Okay, it seems to work here (I just did the imports outside the function calls, since doing it inside functions is -bad- practice).

Re: [PyKDE] The tablet event, it works not!

2004-10-17 Thread Sundance
I heard Kaleb Pederson said: > Ok. I would probably only look at Qt as it sounds like it's the > culprit. Could Python or your C++ program have linked to a different > version of Qt that didn't have tablet support? Package management makes it very, very unlikely. I've doublechecked, to be certa

Re: [PyKDE] The tablet event, it works not!

2004-10-16 Thread Sundance
I heard Kaleb Pederson said: > My new kernel works. Your program worked just fine with my Tablet as > did my old test program (I would have given it to you as well, but I > wasn't sure what state I had left it in). I'm using sip 4.1.1, PyQt > 3.13 and Qt 3.3.3. There must be something else awry

Re: [PyKDE] The tablet event, it works not!

2004-10-14 Thread Sundance
I heard Kaleb Pederson said: > I do, sorry :) Even though I don't have the wacom module loading on > mine, I can use my tablet in Gimp -- I just can't use the tablet > specific items. I can. All of them are recognized alright: pointer, stylus, eraser. Additionally, the pointer is in relative mo

Re: [PyKDE] The tablet event, it works not!

2004-10-13 Thread Sundance
I heard Kaleb Pederson said: > Is your event handler being called at all? Nope, it isn't. > If not, it sounds like your kernel and X aren't configured correctly. I doublechecked that they are, don't worry. :) And xinput devices work fine in Gimp. I suspect the problem resides in the event not

Re: [PyKDE] The tablet event, it works not!

2004-10-12 Thread Sundance
> This is with Qt 3.3.3 and PyQt 3.12. > Yes, Qt has been compiled with tablet supported enabled, I've > doublechecked. > > Anyone has any idea what I'm doing wrong? Still no taker...? -- S. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.f

[PyKDE] The tablet event, it works not!

2004-10-11 Thread Sundance
Hello people, I've been playing around with tabletEvents, and they just plain don't work. See the attached script: ---[ tabletevents.py ]- import sys from qt import * class TabletWidget(QLabel): def __init__(self, parent=None, t

Re: [PyKDE] big Text in pyqt

2004-10-07 Thread Sundance
I heard Axel Mittendorf said: > Hi, what is the most efficient way to display a big text in a pyqt > app? Did you try to set the QTextEdit widget in LogText mode? t=QTextEdit() t.setTextFormat(QTextEdit.LogText) You may also want to turn undo/redo off: t.setUndoRedoEnabled(False) How muc

Re: [PyKDE] eric3 anti-aliasing problem (!?)

2004-09-25 Thread Sundance
I heard Solly Brown said: > In fact, the fonts in the > menu-bar, tabs, and dialogs in eric3 are perfectly ok too... for some > reason it's just the main text editing window/widget in eric3 which > seems unable to produce anti-aliased text. Hello Solly! Okay, could you maybe upload a screenshot

Re: [PyKDE] Connect syntax.

2004-09-23 Thread Sundance
I heard Bryan O'Sullivan said: > What's wrong with not respecting the Qt API? The Principle of Least Surprise, I suppose. I'll venture that Phil's clients are in good part people who already know Qt and are moving to Python. It would not be very good marketing to surprise them with significant

Re: [PyKDE] Connect syntax.

2004-09-23 Thread Sundance
I heard David Boddie said: > Can't you achieve this by rebinding connect like you suggested > before? Yep, in fact that's what I'm planning to do in a small homemade wrapper around PyQt. > Did I miss that part of the discussion? :-/ Oh, it was just an idea about allowing this syntax: someBut

Re: [PyKDE] Connect syntax.

2004-09-22 Thread Sundance
I heard Phil Thompson said: > I have a policy of not (if at all possible) changing or "enhancing" > the API. C++ Qt: SomeWidget::SomeWidget () { // ... connect (this, SIGNAL("whatever()"),// <-- look! otherWidget, SLOT("blah()")); // ... } Current PyQt: class

[PyKDE] Connect syntax.

2004-09-22 Thread Sundance
Hello, It occured to me, while I was code-doodling today, that as it currently stands, the connect syntax in Python is just a tiny little bit more awkward than necessary. See: class MyNiftyLittleWidget(QSomeWidget): def __init__(self, otherWidget): # ... # Blah # ... self.c

Re: [PyKDE] Custom QScrollBar'ed widgets

2004-09-03 Thread Sundance
I heard Gordon Tyler said: > So these other subwidgets stay still while this one other widget > needs to scroll? I feel cross-eyed already ;) Yes. I'm trying to see how cleanly I could implement that nifty feature in KMuddy, split-screen on scrollback, that splits the viewport when the users sc

Re: [PyKDE] Custom QScrollBar'ed widgets

2004-09-03 Thread Sundance
I heard Gordon Tyler said: > Have a look at QScrollView: > http://doc.trolltech.com/3.3/qscrollview.html > > The Detailed Description section should give you the information you > need for scrolling custom widgets. Thank you, but this won't do. I'd need to attach the scrollbar to a custom widget

[PyKDE] Custom QScrollBar'ed widgets

2004-09-02 Thread Sundance
Greetings, I would like to attach scrollbars to a custom widget, and I'm not sure how to go about it. What is the simplest/cleanest way of informing the QToolBar of the custom widget's viewport size change (when text is appended, for instance), and to sync the scrollbar with the viewport's pos

Re: [PyKDE] ANN: Wiki for PyQt/PyKDE

2004-05-05 Thread Sundance
I heard Torsten Marek said: > as the title suggests, we have a new wiki only for PyQt and PyKDE + > related development. This is excellent! Thank you loads! :) Could there be a link to the Wiki from the KDE web site? Also, will you be posting a news item about it on the Dot (which I believe wou

Re: [PyKDE] Eric3 First impressions and questions

2004-04-28 Thread Sundance
I heard Phil Thompson said: > You must take the same steps as you would if developing an > application for external users. If your users have access to the Qt > API then they will be considered developers and each will need a > license. If not, then you only need one for the person "developing" >

Re: [PyKDE] Looping over QLabels

2004-03-23 Thread Sundance
I heard GuineaPig said: > In my application I have a QDialog with a lot of QLabels. From time > to time these labels need to be cleared (text set to ''). Is there a > way to iterate over the labels ? > I'm looking for something like this: > > for QLabel in self > QLabel.setText('') There

Re: [PyKDE] Direction of output

2004-02-18 Thread Sundance
I heard [EMAIL PROTECTED] said: > I am interested in creating a free version of the windoze program > typeitin. It lets you generate an arbitrary number of buttoms, each > corresponding to an appropriate phrase. For example, you might have > To:, From:, password and so on. You focus on the targ

Re: [PyKDE] Re: Welcome to the "PyKDE" mailing list

2004-01-31 Thread Sundance
I heard David B Harris said: > Anybody know how on god's green earth eric3 looks so good in > http://www.die-offenbachs.de/detlev/eric3-screenshots.html ? It's the Plastik theme that ships with KDE 3.2. Looks really cool, alright. -- S. ___ PyKDE mai

Re: [PyKDE] QComboTableItem problem

2004-01-18 Thread Sundance
Heya people, Been trying to help Lionel there for a while, but I must admit his problem really puzzles me. Anyone more experienced than me care to give us a hand? Thankies. :) Using Qt 3.2.3, Python 2.3.2, SIP 3.8 and PyQt 3.8.1, the code listed in the parent message works just fine here. Appa

Re: [PyKDE] Exceptions and event loop (was: Web article on wxWindows and PyQt)

2003-10-07 Thread Sundance
I heard Ulrich Berning said: > Have a look at sys.excepthook It works beautifully. Thank you so much, Ulrich! :) -- S. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Notifying self on all emits _OR_ overriding default emit behavior

2003-10-07 Thread Sundance
I heard Myddrin said: > Back to my original example. I webbrowser does _NOT_ know the events > (or signals or whatever) of every component that might get loaded > into it. Yet I can use Flash, Real Player, etc in both IE and > Netscape and receive events without the ie and netscape developers > h

[PyKDE] Exceptions and event loop (was: Web article on wxWindows and PyQt)

2003-10-05 Thread Sundance
I heard Hans-Peter Jansen said: > You could redirect stdout/stderr to an internal tee, which would > trigger a PYSIGNAL, which in turn triggers a corresponding dialog. I would *really* not want to go that way, if at all possible... I mean, having to parse a traceback for information, when an exc

Re: [PyKDE] Web article on wxWindows and PyQt

2003-10-05 Thread Sundance
I heard Hans-Peter Jansen said: > Just close()ing the main widget should do the job nicely, as long as > the exception doesn't occur in the ctor/dtor paths of the main > widget. Okay, danke schon! Erm... I happen to have another question... Exception handling while constructing the interface wo

Re: [PyKDE] Web article on wxWindows and PyQt

2003-10-04 Thread Sundance
I heard Hans-Peter Jansen said: > Conclusion: beware from using qApp.quit(), or even sys.exit(0) > without thinking twice. There are almost always better ways to close > a PyQt application. Use them. This interests me. I've been trying to write a clean exception handler around the event loop, so

Re: [PyKDE] Notifying self on all emits _OR_ overriding default emit behavior

2003-10-02 Thread Sundance
I heard Myddrin said: > No, I mispoke. Slots should be signals above. Oh! I see. :) > I would need to take a generic (or ones that inherit from say > MydWidget) object X and discover it's signals so I can subscribe to > them and then call the "webbrowser scripts" Well, I'm not really sure

Re: [PyKDE] Notifying self on all emits _OR_ overriding default emit behavior

2003-10-02 Thread Sundance
I heard Myddrin said: > If I could discover the slots at run time that would work, yes. > However PyQT doesn't expose this info (as far as I know) like the QT > library does.. Erm, so you mean you want to know what slots are going to get triggered by a given signal then...? Why do you want

Re: [PyKDE] Notifying self on all emits _OR_ overriding default emit behavior

2003-10-02 Thread Sundance
I heard Myddrin said: > For the sake of argument, let's say I need to know whenever an object > emits a signal. Well... I'm propably gonna say something stupid, but isn't the straightfoward way to do this, to actually connect the signal to a slot...? -- S.

Re: [PyKDE] QTextEdit and clickable links

2003-09-29 Thread Sundance
I heard Sundance said: > Is there any way to do it that I may not be aware of? Okay, found it. Here's how I did, as a reference in case someone else has the same problem later on. :) The standard behavior of a QTextEdit's content widget (that you obtain with the viewport() method

[PyKDE] QTextEdit and clickable links

2003-09-28 Thread Sundance
Hello people, Is there any way to have clickable links in a QTextEdit? By peeking at Psi's sources, I determined that to make Qt check for links under the mouse pointer, you have to overload a linksEnabled() method to have it return TRUE. Only, this method is private in QTextEdit's code, and o

Re: [PyKDE] When should PYSIGNAL used ?

2003-09-24 Thread Sundance
I heard Tony Cappellini said: > I was going through the pyQT tutorials when PYSIGNAL was used for the > first time in Tutorial 1-7. > Unfortunately the tutorial does not really explain what PYSIGNAL is > and when it is needed, and I don't see any references in PyQT Doc for > PYSIGNAL. Ah, maybe

Re: [PyKDE] ANN: new eric3 snapshot available

2003-09-14 Thread Sundance
I heard Detlev Offenbach said: > This snapshot is available via > http://www.die-offenbachs.de/detlev/snapshots/eric-snapshot-20030914\ .tar.gz And here's the ebuild (it's exactly the same as for the last snapshot, only the name changes, and Portage makes the rest happen automatically -- so tha

Re: [PyKDE] KTrader woes?

2003-09-11 Thread Sundance
I heard Jim Bublitz said: > You'd have to talk to KDE and TrollTech about that - that's > built-in behaviour in the KDE/Qt C++ libs. Some things do throw > an exception/error msgs, like trying to use widgets without a > QApplication/KApplication instance exisiting (although the msg > usually compl

Re: [PyKDE] KTrader woes?

2003-09-10 Thread Sundance
I heard Jim Bublitz said: > It returns a 7 item list here (exact same code as above in a > KApplication). Ah. The 'in a KApplication' part may actually be the crucial point. :) > Can you provide a *short*, complete example > program that segfaults on this? Already did. 0:) #!/bin/env python fr

[PyKDE] KTrader woes?

2003-09-10 Thread Sundance
Hiya, I'm prodding at the under-the-hood niftiness that makes KDE's beauty and strength, using the Python bindings, but so far I've not had much success, I am sorry to report. For example, this code: from kio import * offer = KTrader.self().query("text/html") ... causes Python to segfault. I

Re: [PyKDE] Garbage collection of signal/slot association?

2003-08-30 Thread Sundance
I heard Phil Thompson said: > If it doesn't then it's a bug. Oh, don't worry, I've not had a problem with it -- I was just wondering, is all. :) Thank you, Phil! -- S. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman

[PyKDE] Garbage collection of signal/slot association?

2003-08-27 Thread Sundance
Hello, Here's a silly question: given two qobjects A and B, and a connection between A.SomeSignal and B.SomeSlot, does the connection get garbage collected upon deletion of either A or B? Just wondering. :) -- S. ___ PyKDE mailing list[EMAIL PRO

Re: [PyKDE] ANN: new eric3 snapshot available

2003-08-19 Thread Sundance
I heard Detlev Offenbach said: > This snapshot is available via > http://www.die-offenbachs.de/detlev/snapshots/eric-snapshot-20030817.tar.gz This totally rocks. :D Thank you for all the work, Detlev! I've made an ebuild to make it easier for people to give it a try. Eric is growing from great

[PyKDE] QTextEdit.selectAll() bug? -- Precisions

2003-06-06 Thread Sundance
I heard Sundance said: > No matter what value I pass this method, 0 or otherwise, it always > seems to use the default value of the method's argument, namely > 'true', which selects everything. Not quite what I want it to do! Okay, so I prodded at eric3's sources, an

[PyKDE] QTextEdit.selectAll() bug?

2003-06-06 Thread Sundance
Hi folks, I need to unselect everything in a QTextEdit-derived widget. Based on the C++ Qt API, it would seem that calling selectAll(false) should do it. However, I can't seem to get it to work with PyQt 3.6 No matter what value I pass this method, 0 or otherwise, it always seems to use the def

  1   2   >