[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] PyQt Digest, Vol 72, Issue 53
From: Sean Decal <freshcure () live ! com>
Date: 2010-07-29 22:57:33
Message-ID: SNT115-W4BD2C0657D9A66A09AB4CC8A90 () phx ! gbl
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
Been doing a few excersises from the PyQt4 Rapid Gui Programming with Python and Qt. The \
Chapter 13 Python Editor crashes after about 15 seconds on Linux and Windows using Python 2.6 \
and 2.7 does anyone else get this ?
If I exit the program crashes I get a Segmentation Error in the Geany IDE.
Sean
> From: pyqt-request@riverbankcomputing.com
> Subject: PyQt Digest, Vol 72, Issue 53
> To: pyqt@riverbankcomputing.com
> Date: Thu, 29 Jul 2010 22:29:28 +0100
>
> Send PyQt mailing list submissions to
> pyqt@riverbankcomputing.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> or, via email, send a message with subject or body 'help' to
> pyqt-request@riverbankcomputing.com
>
> You can reach the person managing the list at
> pyqt-owner@riverbankcomputing.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PyQt digest..."
>
>
> Today's Topics:
>
> 1. Re: connect problem on windows xp (F.A.Pinkse)
> 2. Re: connect problem on windows xp (Fabio Mauri)
> 3. Links to the web from html help files in a resource.
> (Robert Norman)
> 4. Which version of Python does dip REALLY work with?
> (Peter Milliken)
> 5. Re: Which version of Python does dip REALLY work with?
> (Phil Thompson)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 29 Jul 2010 16:56:44 +0200
> From: "F.A.Pinkse" <fapinkse@gmail.com>
> To: pyqt@riverbankcomputing.com
> Subject: Re: [PyQt] connect problem on windows xp
> Message-ID: <i2s4rv$hd7$1@dough.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Fabio
>
> To see you print() statements you need to lauch your script with python
> If you use pythonw the script is lauched and the communication channels
> are closed.
>
> Or you use one of these:
>
>
> def noneSelected(self):
> print ("signal catched 2")
> self.dtype.setText("signal catched 2")
> msgBox=QtGui.QMessageBox()
> msgBox.setText("signal catched 2")
> msgBox.exec()
>
> def refreshList(self):
> print ("signal catched 1")
> self.dtype.setText ("signal catched 1")
> msgBox=QtGui.QMessageBox()
> msgBox.setText("signal catched 1")
> msgBox.exec()
>
> I 'borrowed one of the line/text edit widgets.
> Hope this helps.
>
>
> With best regards,
>
>
> Frans.
>
>
> Op 7/29/2010 12:46 PM, Fabio Mauri schreef:
> > Ok, this below is a minimal example.
> > Launching this (with the gui file attached in the previous mail) in
> > Ubuntu 10.04 I can see the prints on cmdline when clicking on
> > pushbuttons, under windows xp I cannot see them.
> >
> > #!/usr/bin/python
> > from twisted.internet import reactor
> > from coherence.base import Coherence
> > from coherence.upnp.core import utils
> >
> > import sys
> > import time
> > from threading import Thread, Timer
> > from Wdw import Ui_Wdw
> > from PyQt4 import QtGui
> > from PyQt4 import QtCore
> > from PyQt4.QtCore import *
> > from PyQt4.QtGui import *
> >
> > class UPnPgui(QtCore.QObject, Ui_Wdw):
> >
> > def __init__(self):
> > self.version = "0.5b"
> > return
> >
> > def doConnections(self):
> > QObject.connect(self.refresh, SIGNAL("clicked()"), self.refreshList)
> > QObject.connect(self.clearSel, SIGNAL("clicked()"), self.noneSelected)
> > return
> >
> > def noneSelected(self):
> > print "signal catched 2"
> >
> > def refreshList(self):
> > print "signal catched 1"
> >
> > if __name__ == "__main__":
> > app = QtGui.QApplication(sys.argv)
> > window = QtGui.QWidget()
> > ui = UPnPgui()
> > ui.setupUi(window)
> > ui.doConnections()
> > window.show()
> > window.geometry()
> > window.setWindowTitle(window.windowTitle() + " version " + ui.version)
> > sys.exit(app.exec_())
> >
> > On Thu, Jul 29, 2010 at 9:32 AM, Sybren A. St?vel<sybren@stuvel.eu> wrote:
> > > On Thu, Jul 29, 2010 at 08:59:16AM +0200, Fabio Mauri wrote:
> > > > Attached you can find the Ui_Wdw class.
> > >
> > > That wasn't my point. Please make a *minimal* bit of code that shows
> > > your problem.
> > >
> > > > In the last connect, I used a different style because for such a
> > > > reason the QObject.connect() i used in the lines above wouldn't work
> > > > while the signal.connect() does (on Ubuntu 10.04).
> > >
> > > That's strange, as signal.connect() works just fine here (Ubuntu
> > > 10.04).
> > >
> > > Please try to make a minimal example, just one bit of code that shows
> > > the problem.
> > >
> > > --
> > > Sybren St?vel
> > >
> > > http://stuvel.eu/
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.6 (GNU/Linux)
> > >
> > > iD8DBQFMUS6h8ZTyn8Yy+5MRAqSpAJ9cdL4gUAHDLuTT2pF+4m9BpU3kbACfe9H+
> > > MMM3k69wFanU5O1GktogOlQ=
> > > =wAb4
> > > -----END PGP SIGNATURE-----
> > >
> > >
> >
> >
> >
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 29 Jul 2010 17:28:56 +0200
> From: Fabio Mauri <fabio.mauri@gmail.com>
> To: "F.A.Pinkse" <fapinkse@gmail.com>
> Cc: pyqt@riverbankcomputing.com
> Subject: Re: [PyQt] connect problem on windows xp
> Message-ID:
> <AANLkTinviUSMfoFTV6Ej2WVcmdoEY4zWWqUyNB+wumuP@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I solved the issue following linjunhalida's suggestion:
>
> adding QObject.__init__(self) in the __init__ function of my GUI,
> everything turns fine also on windows.
>
> Thank you linjunhalida, and thank you all!
>
> On Thu, Jul 29, 2010 at 4:56 PM, F.A.Pinkse <fapinkse@gmail.com> wrote:
> > Hi Fabio
> >
> > To see you print() statements you need to lauch your script with python
> > If you use pythonw the script is lauched and the communication channels are
> > closed.
> >
> > Or you use one of these:
> >
> >
> > ? ?def noneSelected(self):
> > ? ? ? ?print ("signal catched 2")
> > ? ? ? ?self.dtype.setText("signal catched 2")
> > ? ? ? ?msgBox=QtGui.QMessageBox()
> > ? ? ? ?msgBox.setText("signal catched 2")
> > ? ? ? ?msgBox.exec()
> >
> > ? ?def refreshList(self):
> > ? ? ? ?print ("signal catched 1")
> > ? ? ? ?self.dtype.setText ("signal catched 1")
> > ? ? ? ?msgBox=QtGui.QMessageBox()
> > ? ? ? ?msgBox.setText("signal catched 1")
> > ? ? ? ?msgBox.exec()
> >
> > I 'borrowed one of the line/text edit widgets.
> > Hope this helps.
> >
> >
> > With best regards,
> >
> >
> > Frans.
> >
> >
> > Op 7/29/2010 12:46 PM, Fabio Mauri schreef:
> > >
> > > Ok, this below is a minimal example.
> > > Launching this (with the gui file attached in the previous mail) in
> > > Ubuntu 10.04 I can see the prints on cmdline when clicking on
> > > pushbuttons, under windows xp I cannot see them.
> > >
> > > #!/usr/bin/python
> > > from twisted.internet import reactor
> > > from coherence.base import Coherence
> > > from coherence.upnp.core import utils
> > >
> > > import sys
> > > import time
> > > from threading import Thread, Timer
> > > from Wdw import Ui_Wdw
> > > from PyQt4 import QtGui
> > > from PyQt4 import QtCore
> > > from PyQt4.QtCore import *
> > > from PyQt4.QtGui import *
> > >
> > > class UPnPgui(QtCore.QObject, Ui_Wdw):
> > >
> > > ? ? def __init__(self):
> > > ? ? ? ? self.version = "0.5b"
> > > ? ? ? ? return
> > >
> > > ? ? def doConnections(self):
> > > ? ? ? ? QObject.connect(self.refresh, SIGNAL("clicked()"),
> > > self.refreshList)
> > > ? ? ? ? QObject.connect(self.clearSel, SIGNAL("clicked()"),
> > > self.noneSelected)
> > > ? ? ? ? return
> > >
> > > ? ? def noneSelected(self):
> > > ? ? ? ? print "signal catched 2"
> > >
> > > ? ? def refreshList(self):
> > > ? ? ? ? print "signal catched 1"
> > >
> > > if __name__ == "__main__":
> > > ? ? app = QtGui.QApplication(sys.argv)
> > > ? ? window = QtGui.QWidget()
> > > ? ? ui = UPnPgui()
> > > ? ? ui.setupUi(window)
> > > ? ? ui.doConnections()
> > > ? ? window.show()
> > > ? ? window.geometry()
> > > ? ? window.setWindowTitle(window.windowTitle() + " version " + ui.version)
> > > ? ? sys.exit(app.exec_())
> > >
> > > On Thu, Jul 29, 2010 at 9:32 AM, Sybren A. St?vel<sybren@stuvel.eu>
> > > ?wrote:
> > > >
> > > > On Thu, Jul 29, 2010 at 08:59:16AM +0200, Fabio Mauri wrote:
> > > > >
> > > > > Attached you can find the Ui_Wdw class.
> > > >
> > > > That wasn't my point. Please make a *minimal* bit of code that shows
> > > > your problem.
> > > >
> > > > > In the last connect, I used a different style because for such a
> > > > > reason the QObject.connect() i used in the lines above wouldn't work
> > > > > while the signal.connect() does (on Ubuntu 10.04).
> > > >
> > > > That's strange, as signal.connect() works just fine here (Ubuntu
> > > > 10.04).
> > > >
> > > > Please try to make a minimal example, just one bit of code that shows
> > > > the problem.
> > > >
> > > > --
> > > > Sybren St?vel
> > > >
> > > > http://stuvel.eu/
> > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v1.4.6 (GNU/Linux)
> > > >
> > > > iD8DBQFMUS6h8ZTyn8Yy+5MRAqSpAJ9cdL4gUAHDLuTT2pF+4m9BpU3kbACfe9H+
> > > > MMM3k69wFanU5O1GktogOlQ=
> > > > =wAb4
> > > > -----END PGP SIGNATURE-----
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> > _______________________________________________
> > PyQt mailing list ? ?PyQt@riverbankcomputing.com
> > http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> >
>
>
>
> --
> Fabio Mauri
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 29 Jul 2010 09:52:14 -0700
> From: Robert Norman <tfcrobert@gmail.com>
> To: pyqt@riverbankcomputing.com
> Subject: [PyQt] Links to the web from html help files in a resource.
> Message-ID: <4C51B1BE.9070305@gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I'm using a QTextBrowser for my help system and would like to have some
> of the hyperlinks bring up the users full browser so that they can, for
> examle, download support files from third party web sites. All the
> links, of course get the qrc path prepended to the links since all the
> html files are in a resource path "qrc:/Help".
> So my internal link to myPage.html is translated to
> "qrc:/Help/myPage.html".
>
> I'm guessing I'd have to subclass QTextBrowser and check to see if the
> links contain some appropriate pattern link www.* , filter out the qrc
> stuff and pass the link on to the default browser.
>
> Anyone have a sample of doing this?
> Thanks,
> Rob
>
> --
> Robert Norman
> Embedded Systems Software Engineer
> AC Propulsion
> www.acpropulsion.com
> 909-592-5399 x4030
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 30 Jul 2010 07:13:06 +1000
> From: Peter Milliken <peter.milliken@gmail.com>
> To: pyqt@riverbankcomputing.com
> Subject: [PyQt] Which version of Python does dip REALLY work with?
> Message-ID:
> <AANLkTikBRiU39xkay97YQyUMcfGa7uzqNBF77SsDWG3F@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I have Mark Summerfield's book on Rapid gui development with Python and Qt
> and followed the link in Appendix A and found "dip".
>
> I have Python 2.6.2. The web-site states it works with 2.6, 2.7 and 3.x, I
> realise it is 0.1 and is bound to have problems, but...
>
> First problem after installation was that the "shebang" doesn't work with
> cygwin bash and Windows XP i.e. when you just run dip-builder it returns a
> complaint of "no such file" for /c/Python26/Scripts/dip-builder - Python
> doesn't understand bash paths.
>
> Next problem (after explicitly running dip-builder in the Scripts directory)
> was the final line:
>
> wres12386#1(/c/Python26/Scripts)$ python dip-builder
> File "dip-builder", line 93
> sys.exit(app.exec())
> ^
> SyntaxError: invalid syntax
> [exited with 1]
>
> A quick look at the Qt documentation for QApplication shows it should be
> app.exec_()
>
> So that script can't work with ANY version of Python :-)
>
> Fixed that, then it complained with:
>
> wres12386#1(/c/Python26/Scripts)$ python dip-builder
> Traceback (most recent call last):
> File "dip-builder", line 28, in <module>
> from dip.plugins import PluginManager
> File "c:\Python26\lib\site-packages\dip\plugins\__init__.py", line 21, in
> <module>
> from .i_extension_point import IExtensionPoint
> File "c:\Python26\lib\site-packages\dip\plugins\i_extension_point.py",
> line 16, in <module>
> from dip.model import Interface, List, Str
> File "c:\Python26\lib\site-packages\dip\model\__init__.py", line 45, in
> <module>
> from .adapt import adapt
> File "c:\Python26\lib\site-packages\dip\model\adapt.py", line 21
> def adapt(*adapted, to):
> ^
> SyntaxError: invalid syntax
> [exited with 1]
>
> Not sure what this error is - haven't investigated it, thought it might be
> advisable to re-check the versions of Python it is supposed to work with. I
> realise I don't have the latest 2.6.x, but I thought before I go to a lot of
> trouble downloading other versions of Python (I do not want to go to 3.x - I
> need to stay with 2.x), I thought I would ask the question:
>
> Exactly what version of Python has anybody ACTUALLY got the dip distribution
> working with? :-)
>
> In the meantime, I think I'll just go back to reading the book...
>
> Thanks
> Peter
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100730/655ea7c4/attachment-0001.html>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 29 Jul 2010 22:29:24 +0100
> From: Phil Thompson <phil@riverbankcomputing.com>
> To: Peter Milliken <peter.milliken@gmail.com>
> Cc: pyqt@riverbankcomputing.com
> Subject: Re: [PyQt] Which version of Python does dip REALLY work with?
> Message-ID: <422bbea991bc77749b98650b9b873498@localhost>
> Content-Type: text/plain; charset=UTF-8
>
> On Fri, 30 Jul 2010 07:13:06 +1000, Peter Milliken
> <peter.milliken@gmail.com> wrote:
> > Hi,
> >
> > I have Mark Summerfield's book on Rapid gui development with Python and
> Qt
> > and followed the link in Appendix A and found "dip".
> >
> > I have Python 2.6.2. The web-site states it works with 2.6, 2.7 and 3.x,
> I
> > realise it is 0.1 and is bound to have problems, but...
> >
> > First problem after installation was that the "shebang" doesn't work
> with
> > cygwin bash and Windows XP i.e. when you just run dip-builder it returns
> a
> > complaint of "no such file" for /c/Python26/Scripts/dip-builder - Python
> > doesn't understand bash paths.
> >
> > Next problem (after explicitly running dip-builder in the Scripts
> > directory)
> > was the final line:
> >
> > wres12386#1(/c/Python26/Scripts)$ python dip-builder
> > File "dip-builder", line 93
> > sys.exit(app.exec())
> > ^
> > SyntaxError: invalid syntax
> > [exited with 1]
> >
> > A quick look at the Qt documentation for QApplication shows it should be
> > app.exec_()
> >
> > So that script can't work with ANY version of Python :-)
> >
> > Fixed that, then it complained with:
> >
> > wres12386#1(/c/Python26/Scripts)$ python dip-builder
> > Traceback (most recent call last):
> > File "dip-builder", line 28, in <module>
> > from dip.plugins import PluginManager
> > File "c:\Python26\lib\site-packages\dip\plugins\__init__.py", line 21,
> in
> > <module>
> > from .i_extension_point import IExtensionPoint
> > File "c:\Python26\lib\site-packages\dip\plugins\i_extension_point.py",
> > line 16, in <module>
> > from dip.model import Interface, List, Str
> > File "c:\Python26\lib\site-packages\dip\model\__init__.py", line 45,
> in
> > <module>
> > from .adapt import adapt
> > File "c:\Python26\lib\site-packages\dip\model\adapt.py", line 21
> > def adapt(*adapted, to):
> > ^
> > SyntaxError: invalid syntax
> > [exited with 1]
> >
> > Not sure what this error is - haven't investigated it, thought it might
> be
> > advisable to re-check the versions of Python it is supposed to work
> with. I
> > realise I don't have the latest 2.6.x, but I thought before I go to a
> lot
> > of
> > trouble downloading other versions of Python (I do not want to go to 3.x
> -
> > I
> > need to stay with 2.x), I thought I would ask the question:
> >
> > Exactly what version of Python has anybody ACTUALLY got the dip
> > distribution
> > working with? :-)
> >
> > In the meantime, I think I'll just go back to reading the book...
>
> So what version of dip are you using?
>
> dip v0.1 is Python v3 only. For earlier versions of Python you need a
> current snapshot. Hint: pick the one with "py2" in the package name.
>
> Phil
>
>
> ------------------------------
>
> _______________________________________________
> PyQt mailing list
> PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
> End of PyQt Digest, Vol 72, Issue 53
> ************************************
[Attachment #5 (text/html)]
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi,<BR>
<BR>
Been doing a few excersises from the PyQt4 Rapid Gui Programming with Python and Qt. The \
Chapter 13 Python Editor crashes after about 15 seconds on Linux and Windows \
using Python 2.6 and 2.7 does anyone else get this ? <BR> If I exit the program \
crashes I get a Segmentation Error in the Geany IDE.<BR> <BR>
Sean <BR> <BR>> From: pyqt-request@riverbankcomputing.com<BR>> Subject: PyQt \
Digest, Vol 72, Issue 53<BR>> To: pyqt@riverbankcomputing.com<BR>> Date: Thu, 29 Jul 2010 \
22:29:28 +0100<BR>> <BR>> Send PyQt mailing list submissions to<BR>> \
pyqt@riverbankcomputing.com<BR>> <BR>> To subscribe or unsubscribe via the World Wide \
Web, visit<BR>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt<BR>> or, via \
email, send a message with subject or body 'help' to<BR>> \
pyqt-request@riverbankcomputing.com<BR>> <BR>> You can reach the person managing the list \
at<BR>> pyqt-owner@riverbankcomputing.com<BR>> <BR>> When replying, please edit your \
Subject line so it is more specific<BR>> than "Re: Contents of PyQt digest..."<BR>> \
<BR>> <BR>> Today's Topics:<BR>> <BR>> 1. Re: connect problem on windows xp \
(F.A.Pinkse)<BR>> 2. Re: connect problem on windows xp (Fabio Mauri)<BR>> 3. Links to the \
web from html help files in a resource.<BR>> (Robert Norman)<BR>> 4. Which version of \
Python does dip REALLY work with?<BR>> (Peter Milliken)<BR>> 5. Re: Which version of \
Python does dip REALLY work with?<BR>> (Phil Thompson)<BR>> <BR>> <BR>> \
----------------------------------------------------------------------<BR>> <BR>> \
Message: 1<BR>> Date: Thu, 29 Jul 2010 16:56:44 +0200<BR>> From: "F.A.Pinkse" \
<fapinkse@gmail.com><BR>> To: pyqt@riverbankcomputing.com<BR>> Subject: Re: [PyQt] \
connect problem on windows xp<BR>> Message-ID: <i2s4rv$hd7$1@dough.gmane.org><BR>> \
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<BR>> <BR>> Hi Fabio<BR>> \
<BR>> To see you print() statements you need to lauch your script with python<BR>> If you \
use pythonw the script is lauched and the communication channels <BR>> are closed.<BR>> \
<BR>> Or you use one of these:<BR>> <BR>> <BR>> def noneSelected(self):<BR>> \
print ("signal catched 2")<BR>> self.dtype.setText("signal catched 2")<BR>> \
msgBox=QtGui.QMessageBox()<BR>> msgBox.setText("signal catched 2")<BR>> \
msgBox.exec()<BR>> <BR>> def refreshList(self):<BR>> print ("signal catched \
1")<BR>> self.dtype.setText ("signal catched 1")<BR>> msgBox=QtGui.QMessageBox()<BR>> \
msgBox.setText("signal catched 1")<BR>> msgBox.exec()<BR>> <BR>> I 'borrowed one of \
the line/text edit widgets.<BR>> Hope this helps.<BR>> <BR>> <BR>> With best \
regards,<BR>> <BR>> <BR>> Frans.<BR>> <BR>> <BR>> Op 7/29/2010 12:46 PM, \
Fabio Mauri schreef:<BR>> > Ok, this below is a minimal example.<BR>> > Launching \
this (with the gui file attached in the previous mail) in<BR>> > Ubuntu 10.04 I can see \
the prints on cmdline when clicking on<BR>> > pushbuttons, under windows xp I cannot see \
them.<BR>> ><BR>> > #!/usr/bin/python<BR>> > from twisted.internet import \
reactor<BR>> > from coherence.base import Coherence<BR>> > from coherence.upnp.core \
import utils<BR>> ><BR>> > import sys<BR>> > import time<BR>> > from \
threading import Thread, Timer<BR>> > from Wdw import Ui_Wdw<BR>> > from PyQt4 \
import QtGui<BR>> > from PyQt4 import QtCore<BR>> > from PyQt4.QtCore import \
*<BR>> > from PyQt4.QtGui import *<BR>> ><BR>> > class \
UPnPgui(QtCore.QObject, Ui_Wdw):<BR>> ><BR>> > def __init__(self):<BR>> > \
self.version = "0.5b"<BR>> > return<BR>> ><BR>> > def \
doConnections(self):<BR>> > QObject.connect(self.refresh, SIGNAL("clicked()"), \
self.refreshList)<BR>> > QObject.connect(self.clearSel, SIGNAL("clicked()"), \
self.noneSelected)<BR>> > return<BR>> ><BR>> > def \
noneSelected(self):<BR>> > print "signal catched 2"<BR>> ><BR>> > def \
refreshList(self):<BR>> > print "signal catched 1"<BR>> ><BR>> > if __name__ \
== "__main__":<BR>> > app = QtGui.QApplication(sys.argv)<BR>> > window = \
QtGui.QWidget()<BR>> > ui = UPnPgui()<BR>> > ui.setupUi(window)<BR>> > \
ui.doConnections()<BR>> > window.show()<BR>> > window.geometry()<BR>> > \
window.setWindowTitle(window.windowTitle() + " version " + ui.version)<BR>> > \
sys.exit(app.exec_())<BR>> ><BR>> > On Thu, Jul 29, 2010 at 9:32 AM, Sybren A. \
St?vel<sybren@stuvel.eu> wrote:<BR>> >> On Thu, Jul 29, 2010 at 08:59:16AM \
+0200, Fabio Mauri wrote:<BR>> >>> Attached you can find the Ui_Wdw class.<BR>> \
>><BR>> >> That wasn't my point. Please make a *minimal* bit of code that \
shows<BR>> >> your problem.<BR>> >><BR>> >>> In the last connect, \
I used a different style because for such a<BR>> >>> reason the QObject.connect() i \
used in the lines above wouldn't work<BR>> >>> while the signal.connect() does (on \
Ubuntu 10.04).<BR>> >><BR>> >> That's strange, as signal.connect() works just \
fine here (Ubuntu<BR>> >> 10.04).<BR>> >><BR>> >> Please try to make \
a minimal example, just one bit of code that shows<BR>> >> the problem.<BR>> \
>><BR>> >> --<BR>> >> Sybren St?vel<BR>> >><BR>> >> \
http://stuvel.eu/<BR>> >><BR>> >> -----BEGIN PGP SIGNATURE-----<BR>> \
>> Version: GnuPG v1.4.6 (GNU/Linux)<BR>> >><BR>> >> \
iD8DBQFMUS6h8ZTyn8Yy+5MRAqSpAJ9cdL4gUAHDLuTT2pF+4m9BpU3kbACfe9H+<BR>> >> \
MMM3k69wFanU5O1GktogOlQ=<BR>> >> =wAb4<BR>> >> -----END PGP \
SIGNATURE-----<BR>> >><BR>> >><BR>> ><BR>> ><BR>> ><BR>> \
<BR>> <BR>> <BR>> <BR>> ------------------------------<BR>> <BR>> Message: \
2<BR>> Date: Thu, 29 Jul 2010 17:28:56 +0200<BR>> From: Fabio Mauri \
<fabio.mauri@gmail.com><BR>> To: "F.A.Pinkse" <fapinkse@gmail.com><BR>> Cc: \
pyqt@riverbankcomputing.com<BR>> Subject: Re: [PyQt] connect problem on windows xp<BR>> \
Message-ID:<BR>> <AANLkTinviUSMfoFTV6Ej2WVcmdoEY4zWWqUyNB+wumuP@mail.gmail.com><BR>> \
Content-Type: text/plain; charset=ISO-8859-1<BR>> <BR>> I solved the issue following \
linjunhalida's suggestion:<BR>> <BR>> adding QObject.__init__(self) in the __init__ \
function of my GUI,<BR>> everything turns fine also on windows.<BR>> <BR>> Thank you \
linjunhalida, and thank you all!<BR>> <BR>> On Thu, Jul 29, 2010 at 4:56 PM, F.A.Pinkse \
<fapinkse@gmail.com> wrote:<BR>> > Hi Fabio<BR>> ><BR>> > To see you \
print() statements you need to lauch your script with python<BR>> > If you use pythonw \
the script is lauched and the communication channels are<BR>> > closed.<BR>> \
><BR>> > Or you use one of these:<BR>> ><BR>> ><BR>> > ? ?def \
noneSelected(self):<BR>> > ? ? ? ?print ("signal catched 2")<BR>> > ? ? ? \
?self.dtype.setText("signal catched 2")<BR>> > ? ? ? ?msgBox=QtGui.QMessageBox()<BR>> \
> ? ? ? ?msgBox.setText("signal catched 2")<BR>> > ? ? ? ?msgBox.exec()<BR>> \
><BR>> > ? ?def refreshList(self):<BR>> > ? ? ? ?print ("signal catched \
1")<BR>> > ? ? ? ?self.dtype.setText ("signal catched 1")<BR>> > ? ? ? \
?msgBox=QtGui.QMessageBox()<BR>> > ? ? ? ?msgBox.setText("signal catched 1")<BR>> > \
? ? ? ?msgBox.exec()<BR>> ><BR>> > I 'borrowed one of the line/text edit \
widgets.<BR>> > Hope this helps.<BR>> ><BR>> ><BR>> > With best \
regards,<BR>> ><BR>> ><BR>> > Frans.<BR>> ><BR>> ><BR>> > \
Op 7/29/2010 12:46 PM, Fabio Mauri schreef:<BR>> >><BR>> >> Ok, this below is \
a minimal example.<BR>> >> Launching this (with the gui file attached in the previous \
mail) in<BR>> >> Ubuntu 10.04 I can see the prints on cmdline when clicking on<BR>> \
>> pushbuttons, under windows xp I cannot see them.<BR>> >><BR>> >> \
#!/usr/bin/python<BR>> >> from twisted.internet import reactor<BR>> >> from \
coherence.base import Coherence<BR>> >> from coherence.upnp.core import utils<BR>> \
>><BR>> >> import sys<BR>> >> import time<BR>> >> from \
threading import Thread, Timer<BR>> >> from Wdw import Ui_Wdw<BR>> >> from \
PyQt4 import QtGui<BR>> >> from PyQt4 import QtCore<BR>> >> from PyQt4.QtCore \
import *<BR>> >> from PyQt4.QtGui import *<BR>> >><BR>> >> class \
UPnPgui(QtCore.QObject, Ui_Wdw):<BR>> >><BR>> >> ? ? def \
__init__(self):<BR>> >> ? ? ? ? self.version = "0.5b"<BR>> >> ? ? ? ? \
return<BR>> >><BR>> >> ? ? def doConnections(self):<BR>> >> ? ? ? ? \
QObject.connect(self.refresh, SIGNAL("clicked()"),<BR>> >> self.refreshList)<BR>> \
>> ? ? ? ? QObject.connect(self.clearSel, SIGNAL("clicked()"),<BR>> >> \
self.noneSelected)<BR>> >> ? ? ? ? return<BR>> >><BR>> >> ? ? def \
noneSelected(self):<BR>> >> ? ? ? ? print "signal catched 2"<BR>> >><BR>> \
>> ? ? def refreshList(self):<BR>> >> ? ? ? ? print "signal catched 1"<BR>> \
>><BR>> >> if __name__ == "__main__":<BR>> >> ? ? app = \
QtGui.QApplication(sys.argv)<BR>> >> ? ? window = QtGui.QWidget()<BR>> >> ? ? \
ui = UPnPgui()<BR>> >> ? ? ui.setupUi(window)<BR>> >> ? ? \
ui.doConnections()<BR>> >> ? ? window.show()<BR>> >> ? ? \
window.geometry()<BR>> >> ? ? window.setWindowTitle(window.windowTitle() + " version " \
+ ui.version)<BR>> >> ? ? sys.exit(app.exec_())<BR>> >><BR>> >> On \
Thu, Jul 29, 2010 at 9:32 AM, Sybren A. St?vel<sybren@stuvel.eu><BR>> >> \
?wrote:<BR>> >>><BR>> >>> On Thu, Jul 29, 2010 at 08:59:16AM +0200, \
Fabio Mauri wrote:<BR>> >>>><BR>> >>>> Attached you can find the \
Ui_Wdw class.<BR>> >>><BR>> >>> That wasn't my point. Please make a \
*minimal* bit of code that shows<BR>> >>> your problem.<BR>> \
>>><BR>> >>>> In the last connect, I used a different style because for \
such a<BR>> >>>> reason the QObject.connect() i used in the lines above wouldn't \
work<BR>> >>>> while the signal.connect() does (on Ubuntu 10.04).<BR>> \
>>><BR>> >>> That's strange, as signal.connect() works just fine here \
(Ubuntu<BR>> >>> 10.04).<BR>> >>><BR>> >>> Please try to \
make a minimal example, just one bit of code that shows<BR>> >>> the \
problem.<BR>> >>><BR>> >>> --<BR>> >>> Sybren \
St?vel<BR>> >>><BR>> >>> http://stuvel.eu/<BR>> >>><BR>> \
>>> -----BEGIN PGP SIGNATURE-----<BR>> >>> Version: GnuPG v1.4.6 \
(GNU/Linux)<BR>> >>><BR>> >>> \
iD8DBQFMUS6h8ZTyn8Yy+5MRAqSpAJ9cdL4gUAHDLuTT2pF+4m9BpU3kbACfe9H+<BR>> >>> \
MMM3k69wFanU5O1GktogOlQ=<BR>> >>> =wAb4<BR>> >>> -----END PGP \
SIGNATURE-----<BR>> >>><BR>> >>><BR>> >><BR>> \
>><BR>> >><BR>> ><BR>> ><BR>> > \
_______________________________________________<BR>> > PyQt mailing list ? \
?PyQt@riverbankcomputing.com<BR>> > \
http://www.riverbankcomputing.com/mailman/listinfo/pyqt<BR>> ><BR>> <BR>> <BR>> \
<BR>> -- <BR>> Fabio Mauri<BR>> <BR>> <BR>> \
------------------------------<BR>> <BR>> Message: 3<BR>> Date: Thu, 29 Jul 2010 \
09:52:14 -0700<BR>> From: Robert Norman <tfcrobert@gmail.com><BR>> To: \
pyqt@riverbankcomputing.com<BR>> Subject: [PyQt] Links to the web from html help files in a \
resource.<BR>> Message-ID: <4C51B1BE.9070305@gmail.com><BR>> Content-Type: \
text/plain; charset=ISO-8859-1; format=flowed<BR>> <BR>> I'm using a QTextBrowser for my \
help system and would like to have some <BR>> of the hyperlinks bring up the users full \
browser so that they can, for <BR>> examle, download support files from third party web \
sites. All the <BR>> links, of course get the qrc path prepended to the links since all the \
<BR>> html files are in a resource path "qrc:/Help". <BR>> So my internal link to \
myPage.html is translated to <BR>> "qrc:/Help/myPage.html". <BR>> <BR>> I'm guessing \
I'd have to subclass QTextBrowser and check to see if the <BR>> links contain some \
appropriate pattern link www.* , filter out the qrc <BR>> stuff and pass the link on to the \
default browser. <BR>> <BR>> Anyone have a sample of doing this?<BR>> Thanks,<BR>> \
Rob<BR>> <BR>> -- <BR>> Robert Norman<BR>> Embedded Systems Software \
Engineer<BR>> AC Propulsion<BR>> www.acpropulsion.com<BR>> 909-592-5399 x4030<BR>> \
<BR>> <BR>> <BR>> ------------------------------<BR>> <BR>> Message: 4<BR>> \
Date: Fri, 30 Jul 2010 07:13:06 +1000<BR>> From: Peter Milliken \
<peter.milliken@gmail.com><BR>> To: pyqt@riverbankcomputing.com<BR>> Subject: \
[PyQt] Which version of Python does dip REALLY work with?<BR>> Message-ID:<BR>> \
<AANLkTikBRiU39xkay97YQyUMcfGa7uzqNBF77SsDWG3F@mail.gmail.com><BR>> Content-Type: \
text/plain; charset="iso-8859-1"<BR>> <BR>> Hi,<BR>> <BR>> I have Mark \
Summerfield's book on Rapid gui development with Python and Qt<BR>> and followed the link in \
Appendix A and found "dip".<BR>> <BR>> I have Python 2.6.2. The web-site states it works \
with 2.6, 2.7 and 3.x, I<BR>> realise it is 0.1 and is bound to have problems, \
but...<BR>> <BR>> First problem after installation was that the "shebang" doesn't work \
with<BR>> cygwin bash and Windows XP i.e. when you just run dip-builder it returns a<BR>> \
complaint of "no such file" for /c/Python26/Scripts/dip-builder - Python<BR>> doesn't \
understand bash paths.<BR>> <BR>> Next problem (after explicitly running dip-builder in \
the Scripts directory)<BR>> was the final line:<BR>> <BR>> \
wres12386#1(/c/Python26/Scripts)$ python dip-builder<BR>> File "dip-builder", line \
93<BR>> sys.exit(app.exec())<BR>> ^<BR>> SyntaxError: invalid syntax<BR>> [exited \
with 1]<BR>> <BR>> A quick look at the Qt documentation for QApplication shows it should \
be<BR>> app.exec_()<BR>> <BR>> So that script can't work with ANY version of Python \
:-)<BR>> <BR>> Fixed that, then it complained with:<BR>> <BR>> \
wres12386#1(/c/Python26/Scripts)$ python dip-builder<BR>> Traceback (most recent call \
last):<BR>> File "dip-builder", line 28, in <module><BR>> from dip.plugins import \
PluginManager<BR>> File "c:\Python26\lib\site-packages\dip\plugins\__init__.py", line 21, \
in<BR>> <module><BR>> from .i_extension_point import IExtensionPoint<BR>> File \
"c:\Python26\lib\site-packages\dip\plugins\i_extension_point.py",<BR>> line 16, in \
<module><BR>> from dip.model import Interface, List, Str<BR>> File \
"c:\Python26\lib\site-packages\dip\model\__init__.py", line 45, in<BR>> \
<module><BR>> from .adapt import adapt<BR>> File \
"c:\Python26\lib\site-packages\dip\model\adapt.py", line 21<BR>> def adapt(*adapted, \
to):<BR>> ^<BR>> SyntaxError: invalid syntax<BR>> [exited with 1]<BR>> <BR>> Not \
sure what this error is - haven't investigated it, thought it might be<BR>> advisable to \
re-check the versions of Python it is supposed to work with. I<BR>> realise I don't have the \
latest 2.6.x, but I thought before I go to a lot of<BR>> trouble downloading other versions \
of Python (I do not want to go to 3.x - I<BR>> need to stay with 2.x), I thought I would ask \
the question:<BR>> <BR>> Exactly what version of Python has anybody ACTUALLY got the dip \
distribution<BR>> working with? :-)<BR>> <BR>> In the meantime, I think I'll just go \
back to reading the book...<BR>> <BR>> Thanks<BR>> Peter<BR>> -------------- next \
part --------------<BR>> An HTML attachment was scrubbed...<BR>> URL: \
<http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100730/655ea7c4/attachment-0001.html><BR>> \
<BR>> ------------------------------<BR>> <BR>> Message: 5<BR>> Date: Thu, 29 Jul \
2010 22:29:24 +0100<BR>> From: Phil Thompson <phil@riverbankcomputing.com><BR>> To: \
Peter Milliken <peter.milliken@gmail.com><BR>> Cc: pyqt@riverbankcomputing.com<BR>> \
Subject: Re: [PyQt] Which version of Python does dip REALLY work with?<BR>> Message-ID: \
<422bbea991bc77749b98650b9b873498@localhost><BR>> Content-Type: text/plain; \
charset=UTF-8<BR>> <BR>> On Fri, 30 Jul 2010 07:13:06 +1000, Peter Milliken<BR>> \
<peter.milliken@gmail.com> wrote:<BR>> > Hi,<BR>> > <BR>> > I have Mark \
Summerfield's book on Rapid gui development with Python and<BR>> Qt<BR>> > and \
followed the link in Appendix A and found "dip".<BR>> > <BR>> > I have Python \
2.6.2. The web-site states it works with 2.6, 2.7 and 3.x,<BR>> I<BR>> > realise it is \
0.1 and is bound to have problems, but...<BR>> > <BR>> > First problem after \
installation was that the "shebang" doesn't work<BR>> with<BR>> > cygwin bash and \
Windows XP i.e. when you just run dip-builder it returns<BR>> a<BR>> > complaint of \
"no such file" for /c/Python26/Scripts/dip-builder - Python<BR>> > doesn't understand \
bash paths.<BR>> > <BR>> > Next problem (after explicitly running dip-builder in \
</html>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic