Problems with PyQt

M

Michael McGarry

Hi,

I am having a problem making a widget appear. I have 5 widgets which
are windows with no parents. 3 of the widgets appear without a problem
the other 2 widgets will not appear when I invoke widget.show() from
within a handler for another widget. I am completely clueless as to why
these 2 widgets will not draw. One of them is simply a wait window I
want to appear while I am performing a time consuming task.

Here is a snippet of code:

def viewSimButton_pressed(self):
wait_win.waitProgressBar.setPercentageVisible(1)
wait_win.waitProgressBar.setTotalSteps(5)
wait_win.waitProgressBar.setProgress(0)
wait_win.show()
self.hide()
self.viewSimButton.setDown(0)
for loopIdx in range(self.simListBox.count()):
if self.simListBox.isSelected(loopIdx) == 1:
simIdx = loopIdx
simID = self.simListBox.item(simIdx).text().ascii()
# Clear list box
sim_view_win.simOutputListBox.clear()
if os.path.exists(simID) == 1:
os.chdir(simID)
wait_win.waitProgressBar.setProgress(1)
# Check process ID file
if os.path.exists('pid') == 1:
time.sleep(1) # wait 1 second, then check again
pidFile = open('pid','r')
pidStr = pidFile.readline()
if pidStr == 'done\n':
sim_view_win.simStatusLbl.setText('Completed')
else:
sim_view_win.simStatusLbl.setText('Running')
simData = sims[simID]
sim_view_win.simIDEdit.setText(simID)
sim_view_win.hostEdit.setText(simData['host'])
wait_win.waitProgressBar.setProgress(3)
# Fill list box with output files
#
filedir = os.popen('ls','r')
filename = filedir.readline()
while filename:
filename = string.rstrip(filename)
if ((filename != 'pid') and (filename != 'sim_cfg') and (filename !=
'sim_log')
and (filename != 'sim_core')
and (string.find(filename,'.fig') == -1)
and (string.find(filename,'.gp') == -1)):
sim_view_win.simOutputListBox.insertItem(filename)
filename = filedir.readline()
os.chdir('..')
wait_win.waitProgressBar.setProgress(5)
wait_win.hide()
sim_view_win.show()

wait_win will show on the screen but not with it's progress bar. Can
anyone help?

Thanks,

Michael
 
P

Phil Thompson

I suggest that you post your question to the PyKDE mailing list and include a
complete example that demonstrates your problem as an attachment (so the
indentation is preserved).

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top