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
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 the
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
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
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,
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).
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=187view=markup
Basically, you use a QLabel that contains your link in HTML, and
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
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 that
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 as I
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
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 back:
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
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
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
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 thing
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 your
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
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:
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:
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
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 and, crazily enough,
it seems
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;
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
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?
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
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.
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
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
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,
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
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 PyQt
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.
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 said
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,
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
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
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
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 ]
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.
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
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
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
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 distributing
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)
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 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:
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 on
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 it
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?
--
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 ]--
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
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).
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
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 :(
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 mode
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]
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 much
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
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:
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
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,
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
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
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
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 is no
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 target
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
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 I
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), is to have
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 it
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 complains
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]
73 matches
Mail list logo