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_p ressed(self):
wait_win.waitPr ogressBar.setPe rcentageVisible (1)
wait_win.waitPr ogressBar.setTo talSteps(5)
wait_win.waitPr ogressBar.setPr ogress(0)
wait_win.show()
self.hide()
self.viewSimBut ton.setDown(0)
for loopIdx in range(self.simL istBox.count()) :
if self.simListBox .isSelected(loo pIdx) == 1:
simIdx = loopIdx
simID = self.simListBox .item(simIdx).t ext().ascii()
# Clear list box
sim_view_win.si mOutputListBox. clear()
if os.path.exists( simID) == 1:
os.chdir(simID)
wait_win.waitPr ogressBar.setPr ogress(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.readlin e()
if pidStr == 'done\n':
sim_view_win.si mStatusLbl.setT ext('Completed' )
else:
sim_view_win.si mStatusLbl.setT ext('Running')
simData = sims[simID]
sim_view_win.si mIDEdit.setText (simID)
sim_view_win.ho stEdit.setText( simData['host'])
wait_win.waitPr ogressBar.setPr ogress(3)
# Fill list box with output files
#
filedir = os.popen('ls',' r')
filename = filedir.readlin e()
while filename:
filename = string.rstrip(f ilename)
if ((filename != 'pid') and (filename != 'sim_cfg') and (filename !=
'sim_log')
and (filename != 'sim_core')
and (string.find(fi lename,'.fig') == -1)
and (string.find(fi lename,'.gp') == -1)):
sim_view_win.si mOutputListBox. insertItem(file name)
filename = filedir.readlin e()
os.chdir('..')
wait_win.waitPr ogressBar.setPr ogress(5)
wait_win.hide()
sim_view_win.sh ow()
wait_win will show on the screen but not with it's progress bar. Can
anyone help?
Thanks,
Michael
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_p ressed(self):
wait_win.waitPr ogressBar.setPe rcentageVisible (1)
wait_win.waitPr ogressBar.setTo talSteps(5)
wait_win.waitPr ogressBar.setPr ogress(0)
wait_win.show()
self.hide()
self.viewSimBut ton.setDown(0)
for loopIdx in range(self.simL istBox.count()) :
if self.simListBox .isSelected(loo pIdx) == 1:
simIdx = loopIdx
simID = self.simListBox .item(simIdx).t ext().ascii()
# Clear list box
sim_view_win.si mOutputListBox. clear()
if os.path.exists( simID) == 1:
os.chdir(simID)
wait_win.waitPr ogressBar.setPr ogress(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.readlin e()
if pidStr == 'done\n':
sim_view_win.si mStatusLbl.setT ext('Completed' )
else:
sim_view_win.si mStatusLbl.setT ext('Running')
simData = sims[simID]
sim_view_win.si mIDEdit.setText (simID)
sim_view_win.ho stEdit.setText( simData['host'])
wait_win.waitPr ogressBar.setPr ogress(3)
# Fill list box with output files
#
filedir = os.popen('ls',' r')
filename = filedir.readlin e()
while filename:
filename = string.rstrip(f ilename)
if ((filename != 'pid') and (filename != 'sim_cfg') and (filename !=
'sim_log')
and (filename != 'sim_core')
and (string.find(fi lename,'.fig') == -1)
and (string.find(fi lename,'.gp') == -1)):
sim_view_win.si mOutputListBox. insertItem(file name)
filename = filedir.readlin e()
os.chdir('..')
wait_win.waitPr ogressBar.setPr ogress(5)
wait_win.hide()
sim_view_win.sh ow()
wait_win will show on the screen but not with it's progress bar. Can
anyone help?
Thanks,
Michael
Comment