[PyQt] QString rfind exception in uic.loadUi

2010-09-13 Thread Gökçen Eraslan
Hello, When I run this code: from PyQt4 import uic from PyQt4.QtCore import QString uic.loadUi(QString("notexists.ui")) in sip 4.10.2 and PyQt 4.7.3, I'm getting - Traceback (most recent call last): ... ... IOError: [Errno 2] No such file or directory: PyQt4.QtCore.QString(u'n

Re: [PyQt] Converting an ugly path to a shell path

2010-09-13 Thread Sybren A. Stüvel
On Tuesday 14 September 2010 00:08:40 amfr...@web.de wrote: > I think quotes don't work always ? > For example when i have a dir like ""' how do i quote it ? I would take out the middle man. Don't use the shell, unless you really have to. If you just pass a list of arguments to subprocess.Popen,

Re: [PyQt] ANN: Preview of Python code editor widget - pure Python alternative to QScintilla

2010-09-13 Thread Benoît HERVIER
Hello, I use pure python code also for my syntax highlight (not really true as i use QSyntaxHighlighter) : http://khertan.net/khteditor http://gitorious.org/khteditor It's still in developpment, but highlight is fast (it s a require as it for maemo device). Regards, 2010/9/13 Henning Schröder

Re: [PyQt] Access to lines of text on textEdit.

2010-09-13 Thread Algis Kabaila
On Tuesday 14 September 2010 12:24:52 Henning Schröder wrote: > On Tue, Sep 14, 2010 at 4:14 AM, Algis Kabaila wrote: > > Alas, I was not able to use or find findBlockByLineNumber. > > If you enter findBlockByLineNumber in Qt Assistant you will see that > this method belongs to a QTextDocument o

Re: [PyQt] Access to lines of text on textEdit.

2010-09-13 Thread Henning Schröder
On Tue, Sep 14, 2010 at 4:14 AM, Algis Kabaila wrote: > Alas, I was not able to use or find findBlockByLineNumber. If you enter findBlockByLineNumber in Qt Assistant you will see that this method belongs to a QTextDocument object and returns a QTextBlock object QTextEdit has a method called "docu

Re: [PyQt] Access to lines of text on textEdit.

2010-09-13 Thread Algis Kabaila
On Tuesday 14 September 2010 11:01:57 Algis Kabaila wrote: > On Tuesday 14 September 2010 10:09:10 Hans-Peter Jansen wrote: > > On Tuesday 14 September 2010, 01:54:01 Algis Kabaila wrote: > > > Is it possible to access lines of text in a textEdit? If so how can I > > > find information about it? >

Re: [PyQt] Access to lines of text on textEdit.

2010-09-13 Thread Algis Kabaila
On Tuesday 14 September 2010 10:09:10 Hans-Peter Jansen wrote: > On Tuesday 14 September 2010, 01:54:01 Algis Kabaila wrote: > > Is it possible to access lines of text in a textEdit? If so how can I > > find information about it? > > Depending on document type, try this: > > document().fin

Re: [PyQt] Access to lines of text on textEdit.

2010-09-13 Thread Hans-Peter Jansen
On Tuesday 14 September 2010, 01:54:01 Algis Kabaila wrote: > Is it possible to access lines of text in a textEdit? If so how can I > find information about it? Depending on document type, try this: document().findBlockByLineNumber(lineNumber).text() Pete ___

[PyQt] Access to lines of text on textEdit.

2010-09-13 Thread Algis Kabaila
Is it possible to access lines of text in a textEdit? If so how can I find information about it? There is a rather clumsy work around, but there may be a direct and simpler way - I would appreciate any information about it. Al. -- OldAl akaba...@pcug.org.au __

Re: [PyQt] Converting an ugly path to a shell path

2010-09-13 Thread AmFreak
I think quotes don't work always ? For example when i have a dir like ""' how do i quote it ? Am 13.09.2010, 23:42 Uhr, schrieb : Have you try to use quotes ? C. Message du : 13/09/2010 De : amfr...@web.de A : "pyqt@riverbankcomputing.com" Copie à

Re: [PyQt] Converting an ugly path to a shell path

2010-09-13 Thread AmFreak
Hmm that doesn't work, it only seems to change things like multiple "///" to one "/", but doesn't add "\" for special chars. Am 13.09.2010, 21:07 Uhr, schrieb Darryl Wallace : -Original Message- From: pyqt-boun...@riverbankcomputing.com [mailto:pyqt- boun...@riverbankcomputing.co

Re: [PyQt] Add custom widget to the QMenu

2010-09-13 Thread matteo.bosc...@boscolini.eu
Thanks Pete,It was exactly what I was looking for.. Thanks This is the code that I'm using now ..     def contextMenuEvent(self, event) :         qle=QtGui.QLineEdit()        menu =QtGui.QMenu();         wac=QtGui.QWidgetAction(menu)        wac.setDefaultWidget(qle)         action=menu.addAction(

Re: [PyQt] order of flags significant in coercing

2010-09-13 Thread Phil Thompson
On Wed, 8 Sep 2010 14:56:00 +0200, "Hans-Peter Jansen" wrote: > Hi Phil, > > there's an issue with the order of flags when coercing to int for e.g. > QPainter.paintText(): > from PyQt4.QtCore import * type(Qt.AlignLeft|Qt.TextWordWrap|Qt.AlignTop) > type(Qt.AlignLeft|Qt.AlignTo

Re: [PyQt] Converting an ugly path to a shell path

2010-09-13 Thread Darryl Wallace
> -Original Message- > From: pyqt-boun...@riverbankcomputing.com [mailto:pyqt- > boun...@riverbankcomputing.com] On Behalf Of amfr...@web.de > Sent: September-13-10 11:19 AM > To: pyqt@riverbankcomputing.com > Subject: [PyQt] Converting an ugly path to a shell path > > Hi, > > im using a QF

Re: [PyQt] Add custom widget to the QMenu

2010-09-13 Thread Hans-Peter Jansen
On Monday 13 September 2010, 20:46:15 matteo.bosc...@boscolini.eu wrote: > Hi all, What I'm trying to do is to have at the right click on > a QGraphicsItem, a QLineEdit . I'm trying to use the following codedef > contextMenuEvent(self, event) :        #qle=QtGui.QLineEdit()             >    menu =Q

Re: [PyQt] Converting an ugly path to a shell path

2010-09-13 Thread Hans-Peter Jansen
On Monday 13 September 2010, 20:18:39 amfr...@web.de wrote: > Hi, > > im using a QFileDialog to let the user select a path that is used later > in a command send to the shell like this: > > retcode = Popen(command + " " + path, shell=True, stdout = PIPE, stderr = > PIPE) > > The problem that occurs

[PyQt] minor svgviewer fixes

2010-09-13 Thread Hans-Peter Jansen
Hi Phil et al, here are some minor svgviewer fixes: * the bubbles animation looks fine (again?!?) * highQualityAntialiasingAction handling fixed * wheel zooming works now (instead of throwing exceptions) Could somebody explain, what the background option/action is supposed to do? To me, it loo

[PyQt] Add custom widget to the QMenu

2010-09-13 Thread matteo.bosc...@boscolini.eu
Hi all, What I'm trying to do is to have at the right click on a QGraphicsItem, a QLineEdit . I'm trying to use the following codedef contextMenuEvent(self, event) :        #qle=QtGui.QLineEdit()                menu =QtGui.QMenu();        action=menu.addAction("test");        menu.exec_(event

[PyQt] SVG Glyphs in PyQt

2010-09-13 Thread Kyle Covington
Recently I found that svg files generated by Cairo do not plot properly in pyqt. The error comes from the use of glyphs which seem not to be shown in pyqt (this might be wrong but I couldn't find any way of getting glyphs to render). I ended up writing a set of functions that will convert the gly

[PyQt] Converting an ugly path to a shell path

2010-09-13 Thread AmFreak
Hi, im using a QFileDialog to let the user select a path that is used later in a command send to the shell like this: retcode = Popen(command + " " + path, shell=True, stdout = PIPE, stderr = PIPE) The problem that occurs now is when the user selects an "ugly" path like this /home/user/

Re: [PyQt] ANN: Preview of Python code editor widget - pure Python alternative to QScintilla

2010-09-13 Thread Henning Schröder
On Thu, Sep 2, 2010 at 6:48 AM, wrote: > Hello, > CodeAide looks interesting. > > I've two questions : > > Is it to add other languages that Python ? There is some code for QtScript syntax included. Additionally the highlighter class is very flexible and accepts custom syntax defininitons. Django

[PyQt] Segfault when trying to use QtOpenGL

2010-09-13 Thread Berthold Höllmann
I just installed SIP 4.11.1 and PyQt x11 gpl 4.7.6 on SuSE Linux 11.2. When I start qtdemo I get: X Error: BadLength (poly request too large or internal Xlib length error) 16 Extension:136 (Uknown extension) Minor opcode: 17 (Unknown request) Resource id: 0x17 QGLContext::makeCurrent()

Re: [PyQt] SIP converts "unsigned int" into unknown type

2010-09-13 Thread Hans Meine
Am Montag 13 September 2010, 15:48:32 schrieb Phil Thompson: > Hmm - try adding... > > typedef unsigned int uint; > > to the sip.h in the siplib directory. Actually, I considered simply putting that into my %ModuleHeaderCode, but wouldn't that lead to problems when I start #include'ing headers

Re: [PyQt] pyuic4 crash in 4.7.6

2010-09-13 Thread Sybren A. Stüvel
On Monday 13 September 2010 12:11:48 Gökçen Eraslan wrote: > That's fixed in the latest snapshot, by the way. Great, thanks! -- Sybren A. Stüvel http://stuvel.eu/ signature.asc Description: This is a digitally signed message part. ___ PyQt mailing lis

Re: [PyQt] SIP converts "unsigned int" into unknown type

2010-09-13 Thread Phil Thompson
On Mon, 13 Sep 2010 15:36:01 +0200, Hans Meine wrote: > Hi, > > I am trying to compile SIP-exported modules using MSVC2008 instead of > GCC/mingw. A problem arises because SIP silently transforms 'unsigned > int' > from my .sip files into 'uint' declarations (e.g. for a0/sipRes) in the > sip*

[PyQt] SIP converts "unsigned int" into unknown type

2010-09-13 Thread Hans Meine
Hi, I am trying to compile SIP-exported modules using MSVC2008 instead of GCC/mingw. A problem arises because SIP silently transforms 'unsigned int' from my .sip files into 'uint' declarations (e.g. for a0/sipRes) in the sip*cpp files, and MSVC chokes on that (undeclared type). (It is probabl

Re: [PyQt] dip Snapshot Support for Python v2.6 and v2.7

2010-09-13 Thread Phil Thompson
On Mon, 13 Sep 2010 08:59:42 -0400, Darren Dale wrote: > On Mon, Jul 26, 2010 at 9:34 AM, Darren Dale wrote: >> On Mon, Jul 26, 2010 at 4:00 AM, Phil Thompson >> wrote: >>> On Sun, 25 Jul 2010 17:30:28 -0400, Darren Dale >>> wrote: On Sat, Jul 24, 2010 at 2:26 PM, Phil Thompson wrote

Re: [PyQt] dip Snapshot Support for Python v2.6 and v2.7

2010-09-13 Thread Darren Dale
On Mon, Jul 26, 2010 at 9:34 AM, Darren Dale wrote: > On Mon, Jul 26, 2010 at 4:00 AM, Phil Thompson > wrote: >> On Sun, 25 Jul 2010 17:30:28 -0400, Darren Dale >> wrote: >>> On Sat, Jul 24, 2010 at 2:26 PM, Phil Thompson >>> wrote: The current dip snapshots now support Python v2.6 and v2.

Re: [PyQt] pyuic4 crash in 4.7.6

2010-09-13 Thread Gökçen Eraslan
07 Eylül 2010 Salı günü (saat 12:32:29) Sybren A. Stüvel şunları yazmıştı: > Thanks for the workaround. However, it's not something I'd like to put > into our development manual and have every developer go through. I'll > wait for a proper fix That's fixed in the latest snapshot, by the way. --

[PyQt] QTableView: Simplest way to find a string in the horizontalHeader?

2010-09-13 Thread luca_manganelli
Hi, I have a QtableView. What's the simplest way to find the column index of a QString in the horizontalHeader() ? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] QMapTool problem

2010-09-13 Thread luca_manganelli
Hi, i'm writing a PyQT program. I've set up a Qtoolbar with a QtoolButton, which shows a menu of 3 buttons with 3 different icons. The problem is that the QToolButton shows *always* the icon of the first button (this if I click on the second and on third...). If I click on the qtoolbutton, the m