473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

PyQt: Can't show QFileDialog.getExistingDirectory in Python Thread, bug or not?

Hi,

I use QT nc,PyQt NC 3.8 in Win32 platform. python 2.3.
I need show getExistingDirectory in my program. I catch a question.

When I show a Dialog in a python function.it's ok. exp:

def showDirectory:
dl=QFileDialog.getExistingDirectory('',None,
'get directory',
'choose directory',1)
print str(dl)

When I call this function in a python thread. the whole program halted
at once. It's seem a infinite loop. exp:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main function start.....
thread = Thread(target = next, args = [params, frmMain, doneflag])
thread.setDaemon(false)
thread.start()
def next(params, d, doneflag):
dow = Download ()
d.dow = dow
dow.download(params, d.chooseFile, d.updateStatus, d.finished, d.error,
doneflag, 100, d.newpath)
if not d.fin:
d.failed()

def onChooseFile(self, default, bucket, f, size, dir, saveas):
if saveas != '':
dl = saveas
else:
if dir:
dl=QFileDialog.getExistingDirectory('',None,
'get directory',
'choose directory',1)
else:
dl = QFileDialog.getSaveFileName(tempShow, "*.*",
self, "FileDialog")

It's very cute I can use QFileDialog.getSaveFileName. Why I can't use
dl=QFileDialog.getExistingDirectory.

It's a Qt small bug???

Ulysses
Jul 18 '05 #1
0 2590

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ulysses | last post by:
Hi, I use PyQt 3.8 non-commercial version in win32. I get a big question. I Can't show PY variable in QT filedialog as initially parameter. Code sample is following:...
2
by: Sibylle Koczian | last post by:
Still trying to learn PyQt from a book about several Python GUI toolkits, I seem to learn first what doesn't work. The following small script seems to work, but after closing the window I get the...
1
by: Christopher Stone | last post by:
Does anyone have an example of how to do this? When I try to make a class that subclasses from a QFilePreview class and a QWidget class, I get the following error: TypeError: Cannot sub-class...
16
by: Nanoscalesoft | last post by:
hello all, I am planning to start coding a nanoscale design software in python with QT interface.I have to do this in windows or linux.Intially windows would be fine. I have struggled almost full...
1
by: tim.stoop | last post by:
Hi people, I'm trying my first little app to create a small, simple application in Python (just to see how PyQt works and all) and I seem to get stuck. I want to make a front-end for...
9
by: anders | last post by:
I am writing a plugin for a piece of software in python, and I want to start up a PyQt GUI in the plugin, without stalling the main thread while the gui is running (later i will want to pass...
1
by: Alexander Eisenhuth | last post by:
Hello alltogether, My System: Python 2.5.1 Boost.Python Qt 4.2.2 SIP 4.6 PyQt 4.2 WinXp
4
by: Markus Dahlbokum | last post by:
Hello, I'm trying to link python statically with qt and pyqt. I've tried this in several ways but never succeeded. At the moment the final make runs without errors but I get import errors when...
1
by: klia | last post by:
hey folks; i am working on my program using python and PYQT that is suppose to load digital photos into the main interface of my program and perform few action on them. i have here the codes that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.