Re: Python and Qt4 Designer

2012-07-16 Thread Michael Torrie
On 07/15/2012 01:58 AM, Vincent Vande Vyvre wrote: > Rusi is not the op, and his question is about these lines > > app = None > if ( not app ): Yeah that's a no-op. The original author of that code is clearly confused there. > > not this one > > app = QtGui.QApplication([]) >

Re: Python and Qt4 Designer

2012-07-15 Thread Vincent Vande Vyvre
On 15/07/12 07:31, Michael Torrie wrote: > On 07/14/2012 11:13 AM, rusi wrote: >> I looked at the second link and find code like this: >> >> app = None if ( not app ): app = QtGui.QApplication([]) >> >> Maybe I'm dense but whats that if doing there? >> >> Frankly I seem to be a bit jinxed with gui

Re: Python and Qt4 Designer

2012-07-14 Thread Michael Torrie
On 07/14/2012 11:13 AM, rusi wrote: > I looked at the second link and find code like this: > > app = None if ( not app ): app = QtGui.QApplication([]) > > Maybe I'm dense but whats that if doing there? > > Frankly I seem to be a bit jinxed with gui stuff. A few days ago > someone was singing t

Re: Python and Qt4 Designer

2012-07-14 Thread rusi
On Jul 14, 7:45 pm, Michael Torrie wrote: > On 07/13/2012 03:12 PM, Jean Dubois wrote: > > > Thanks for the extra docu references > > In this day and age, I think compiling ui files to code is probably on > the way out.  Instead you should consider using the ui files directly in > your code.  This

Re: Python and Qt4 Designer

2012-07-14 Thread Michael Torrie
On 07/13/2012 03:12 PM, Jean Dubois wrote: > Thanks for the extra docu references In this day and age, I think compiling ui files to code is probably on the way out. Instead you should consider using the ui files directly in your code. This has the advantage of letting you change the gui somewha

Re: Python and Qt4 Designer

2012-07-13 Thread Jean Dubois
t;> > >> > >> > >> > >> > >> > >>> I'm trying to combine python-code made with QT4 designer > with plain > >>> python statements like > >>> file = open("test","w") > >>> Can a

Re: Python and Qt4 Designer

2012-07-12 Thread Vincent Vande Vyvre
On 12/07/12 08:42, Jean Dubois wrote: > On 12 jul, 02:59, Vincent Vande Vyvre > wrote: >> On 11/07/12 17:37, Jean Dubois wrote: >> >> >> >> >> >> >> >>> I'm trying to combine python-code made with QT4 designer with plain >&g

Re: Python and Qt4 Designer

2012-07-11 Thread Jean Dubois
On 12 jul, 02:59, Vincent Vande Vyvre wrote: > On 11/07/12 17:37, Jean Dubois wrote: > > > > > > > > > I'm trying to combine python-code made with QT4 designer with plain > > python statements like > > file = open("test","w") &g

Re: [newbie] Python and Qt4 Designer

2012-07-11 Thread Vincent Vande Vyvre
On 11/07/12 17:37, Jean Dubois wrote: > I'm trying to combine python-code made with QT4 designer with plain > python statements like > file = open("test","w") > Can anyone tell me what I have to add to the following code just to > open a file when click

[newbie] Python and Qt4 Designer

2012-07-11 Thread Jean Dubois
I'm trying to combine python-code made with QT4 designer with plain python statements like file = open("test","w") Can anyone tell me what I have to add to the following code just to open a file when clicking on the load-button and closing it by clicking on the save butto

Re: Substitute for KConfig in Qt4

2009-09-22 Thread nusch
On Sep 22, 3:43 pm, David Boddie wrote: > On Sat Sep 19 12:18:40 CEST 2009, nusch wrote: > > > On Sep 19, 3:53 am, David Boddie wrote: > > > On Thursday 17 September 2009 13:04, nusch wrote: > > > > I want to remove pyKDE dependencies from my app to make it pure PyQt. > > > > What will be the bes

Re: Substitute for KConfig in Qt4

2009-09-22 Thread David Boddie
On Sat Sep 19 12:18:40 CEST 2009, nusch wrote: > On Sep 19, 3:53 am, David Boddie wrote: > > On Thursday 17 September 2009 13:04, nusch wrote: > > > I want to remove pyKDE dependencies from my app to make it pure PyQt. > > > What will be the best substitute for KConfig? > > > > What exactly do you

Re: Substitute for KConfig in Qt4

2009-09-21 Thread nusch
On Sep 19, 3:53 am, David Boddie wrote: > On Thursday 17 September 2009 13:04, nusch wrote: > > > I want to remove pyKDE dependencies from my app to make it pure PyQt. > > What will be the best substitute for KConfig? > > What exactly do you use KConfig for in your application? > > David e.g stor

Re: Substitute for KConfig in Qt4

2009-09-18 Thread David Boddie
On Thursday 17 September 2009 13:04, nusch wrote: > I want to remove pyKDE dependencies from my app to make it pure PyQt. > What will be the best substitute for KConfig? What exactly do you use KConfig for in your application? David -- http://mail.python.org/mailman/listinfo/python-list

QT4

2009-01-14 Thread Stephen Chapman
Hey, looks like Nokia bought Qt and solved the Open Source/Commercial license issue: http://rss.slashdot.org/~r/Slashdot/slashdot/~3/A4br-rQA460/article.pl I wonder if pyqt will follow suit... -- http://mail.python.or

Re: qt4 setFlags

2007-06-14 Thread Diez B. Roggisch
luca72 schrieb: > Hello > > I make this code: > row = self.tableWidget.rowCount() > for a in range(row): > self.tableWidget.item(row, 0).setFlags(Qt.IsSelectable) > > i have this erroror : > > global name Qt is not definied import Qt might help. And reading the python tutori

qt4 setFlags

2007-06-14 Thread luca72
Hello I make this code: row = self.tableWidget.rowCount() for a in range(row): self.tableWidget.item(row, 0).setFlags(Qt.IsSelectable) i have this erroror : global name Qt is not definied Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Qt4 in ubuntu

2007-04-16 Thread Diez B. Roggisch
> > Hi Diez, finally I can install a Qt4 on Kubuntu, but now I have > problems to install a Qt4Designer. > I'm introducing to Qt with python, why tutorial you recommend to me? Google for them. And use C++-tutorials, they can be easily translated to python. Diez -- http:

Re: Qt4 in ubuntu

2007-04-16 Thread Marcpp
On 15 abr, 22:54, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Marcpp schrieb: > > > Is possible install Qt4 pyqt4 under kubuntu? > > Few times ago i tried to run pyqt in ubuntu (gnome) but i can't > > do it. > > It's certainly possible

Re: Qt4 in ubuntu

2007-04-15 Thread Parthan SR
On 15 Apr 2007 13:24:22 -0700, Marcpp <[EMAIL PROTECTED]> wrote: Is possible install Qt4 pyqt4 under kubuntu? Few times ago i tried to run pyqt in ubuntu (gnome) but i can't do it. Installation as in [1] Installing using the apt-get/synaptic/adept/aptitude which is present in Ubu

Re: Qt4 in ubuntu

2007-04-15 Thread Diez B. Roggisch
Marcpp schrieb: > Is possible install Qt4 pyqt4 under kubuntu? > Few times ago i tried to run pyqt in ubuntu (gnome) but i can't > do it. It's certainly possible. On ubuntu as well as on kubuntu. You can install all KDE and Qt stuff on ubuntu as well. But unless you are more

Qt4 in ubuntu

2007-04-15 Thread Marcpp
Is possible install Qt4 pyqt4 under kubuntu? Few times ago i tried to run pyqt in ubuntu (gnome) but i can't do it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Py2exe & (Py)QT4

2006-07-20 Thread David Boddie
[EMAIL PROTECTED] wrote: > I'm having trouble using Py2exe with a PyQT-based python project. Or > possibly I'm having a problem with PyQT and Py2exe makes it apparent. > Whichever it is, I run into trouble with importing QtCore and QtGui. > The error reported is: > > Traceback (most recent call la

Py2exe & (Py)QT4

2006-07-20 Thread shane . external
I'm having trouble using Py2exe with a PyQT-based python project. Or possibly I'm having a problem with PyQT and Py2exe makes it apparent. Whichever it is, I run into trouble with importing QtCore and QtGui. The error reported is: Traceback (most recent call last): File "xmlEdit.py", line 3, i

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
K.S.Sreeram wrote: > so does that mean the BGRA raw mode is supported in PIL 1.1.6? possibly; I haven't checked. it does mean that some future version will most likely support it, at least. -- http://mail.python.org/mailman/listinfo/python-list

Re: image lib & Qt4

2006-06-03 Thread K.S.Sreeram
thanks! so does that mean the BGRA raw mode is supported in PIL 1.1.6? Regards Sreeram Fredrik Lundh wrote: > K.S.Sreeram wrote: > >> I was hacking the code trying to support RGBA mode images, and >> inadvertently i tried im.tostring("raw","BGRX") on the RGBA mode image. >> >> So BGRX does indee

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
K.S.Sreeram wrote: > I was hacking the code trying to support RGBA mode images, and > inadvertently i tried im.tostring("raw","BGRX") on the RGBA mode image. > > So BGRX does indeed work for RGB mode images. > > While trying to support RGBA mode images, i realized that a BGRA raw > mode is neede

Re: image lib & Qt4

2006-06-03 Thread K.S.Sreeram
My bad. I was hacking the code trying to support RGBA mode images, and inadvertently i tried im.tostring("raw","BGRX") on the RGBA mode image. So BGRX does indeed work for RGB mode images. While trying to support RGBA mode images, i realized that a BGRA raw mode is needed for working with QImage.

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
K.S.Sreeram wrote: > I'm getting an 'unknown raw mode' error on ImageQt.py:59: > data = im.tostring( "raw", "BGRX" ) > > Does this only work with PIL 1.1.6 snapshots? I currently have > PIL 1.1.5. it was developed on Python 2.4.3 and PIL 1.1.5, so it should work. and BGRX support has been i

Re: image lib & Qt4

2006-06-03 Thread K.S.Sreeram
Fredrik Lundh wrote: > Fredrik Lundh wrote: > > I've posted a simple ImageQt interface module for PIL and PyQt4 here: > > http://svn.effbot.python-hosting.com/stuff/sandbox/pil/ImageQt.py > I'm getting an 'unknown raw mode' error on ImageQt.py:59: data = im.tostring( "raw", "BGRX" ) Doe

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
Fredrik Lundh wrote: >> To get better performance, you should be able to use PIL's tostring() >> method together with the QImage(buffer, width, height, depth, >> colortable, numColors, bitOrder) form of the QImage constructor. I've posted a simple ImageQt interface module for PIL and PyQt4 here

Re: image lib & Qt4

2006-06-01 Thread Fredrik Lundh
Fredrik Lundh wrote: > To get better performance, you should be able to use PIL's tostring() > method together with the QImage(buffer, width, height, depth, > colortable, numColors, bitOrder) form of the QImage constructor. for PyQt4, that seems to have changed to QImage(buffer, width, height,

Re: image lib & Qt4

2006-06-01 Thread Fredrik Lundh
aljosa wrote: > does anybody know how to load (in-memory > representation of PNG image) from Qt (v.4.1.3) as QImage? If you want the data from a StringIO object, you can either *read* the data from the object (it's a file-like object, after all), or use the getvalue() method. Something like

Re: py2exe & qt4/qimage

2006-06-01 Thread Serge Orlov
aljosa wrote: > i'm trying to convert python (image resizer script using PyQt4) script > to exe but support for jpeg and tiff image formats is located in > Qt4.1\plugins\imageformats (dll files) and when script is converted > exe file doesn't support jpeg and tiff. > > i tryed using all file format

Re: image lib & Qt4

2006-06-01 Thread aljosa
does anybody know how to load (in-memory representation of PNG image) from Qt (v.4.1.3) as QImage? Diez B. Roggisch wrote: > aljosa wrote: > > > i'm looking for image lib which supports common image types (maybe > > freeimagepy?) and is relatively easy to display image loaded through > > that lib

Re: image lib & Qt4

2006-06-01 Thread Diez B. Roggisch
aljosa wrote: > i'm looking for image lib which supports common image types (maybe > freeimagepy?) and is relatively easy to display image loaded through > that lib in PyQt4. > any ideas? Use PIL & StringIO to create a in-memory representation of the image as e.g. PNG. Load that using Qt. Diez -

image lib & Qt4

2006-06-01 Thread aljosa
i'm looking for image lib which supports common image types (maybe freeimagepy?) and is relatively easy to display image loaded through that lib in PyQt4. any ideas? Aljosa -- http://mail.python.org/mailman/listinfo/python-list

py2exe & qt4/qimage

2006-06-01 Thread aljosa
i'm trying to convert python (image resizer script using PyQt4) script to exe but support for jpeg and tiff image formats is located in Qt4.1\plugins\imageformats (dll files) and when script is converted exe file doesn't support jpeg and tiff. i tryed using all file formats in script: tmp1 = QImag