[PyQt] Using QFileDialog to display the contents within a patricular folder..

2010-01-12 Thread Jebagnana Das
Hello all, Is there a way that i can make the QFileDialog to display the contents of a patricular directory.. For example i want the user to select only the files or folders within my documents.. The file dialog should display My Documents only as a parent directory and it's contents

Re: [PyQt] Problem freezing a Sqlite based PyQT app

2010-01-12 Thread Giovanni Bajo
On Mon, 2010-01-11 at 21:54 -0500, Demetrius Cassidy wrote: You probably forgot to include the sqlite3.dll with your redist package. Alternatively, you can try to use py2exe instead of cx_Freeze. It works pretty well for me and is good at picking up dependencies. AFAIK, py2exe doesn't have

Re: [PyQt] Problem freezing a Sqlite based PyQT app

2010-01-12 Thread Demetrius Cassidy
I actually had nothing but problems with PyInstaller. In my instance, I am using Twisted + PyQt4 in my app, so I could never even get it to run while frozen. Not to mention it seems to want to pickup every dll in my system to package it into my app (like kernel32.dll). You can manually copy

Re: [PyQt] Getting a couple errors when I try and start a QMainWindow from a QMainWindow

2010-01-12 Thread dizou
Did: self.vtkWidget = QVTKRenderWindowInteractor(self) instead of: self.vtkWidget = QVTKRenderWindowInteractor() Since QVTKRenderWindowInteractor inherits QWidget, it calls: QtGui.QWidget.__init__(self, parent, wflags|QtCore.Qt.MSWindowsOwnDC) So I guess once I passed a parent in, it knew

[PyQt] Different Behavior between Python 2.6 and Python 3.1.1

2010-01-12 Thread Richard Parker
I have the following statement in an application that runs fine with Python 2.6 (and PyQt): text = self.ui.txtText.text().left(5).toUpper() In Python 3.1.1 (with PyQt), I get the following error for the first statement: text = self.ui.txtText.text().left(5).toUpper() AttributeError: 'str'

Re: [PyQt] Different Behavior between Python 2.6 and Python 3.1.1

2010-01-12 Thread Demetrius Cassidy
I think .text() in Python 3.1 with PyQt4 is returning a python 'str' object, instead of a QString. Try and do type(self.ui.txtText.text()) and see what it returns. Richard Parker wrote: I have the following statement in an application that runs fine with Python 2.6 (and PyQt): text

Re: [PyQt] Different Behavior between Python 2.6 and Python 3.1.1

2010-01-12 Thread Richard Parker
Demetrius, I think you are right, but how can I achieve the same functionality with Python 3.1.1, as I do with Python 2.6? (i.e., left(5).toUpper()) for the str that's returned by Python 3.1.1? I looked at [0:05].format(self.ui.txtText.text()) and that seemed to work, although it didn't

Re: [PyQt] Different Behavior between Python 2.6 and Python 3.1.1

2010-01-12 Thread Demetrius Cassidy
*int(**self.ui.txtNumber.text()) * str('abcdefg').upper() Richard Parker wrote: Demetrius, I think you are right, but how can I achieve the same functionality with Python 3.1.1, as I do with Python 2.6? (i.e., left(5).toUpper()) for the str that's returned by Python 3.1.1? I looked at

Re: [PyQt] Different Behavior between Python 2.6 and Python 3.1.1

2010-01-12 Thread Demetrius Cassidy
Stupid thunderbird messed up the formatting. use int('12345') to conver a string to integer. and .upper() to conver to uppercase. Demetrius Cassidy wrote: *int(**self.ui.txtNumber.text()) * str('abcdefg').upper() Richard Parker wrote: Demetrius, I think you are right, but how can I achieve