That while loop in your StartTimer function is a problem. You can't have the main application thread go into a blocking loop and sleep. It will hang up the app while it is running. So you did get rid of that completely and are using the QTimer now? No more while loops and sleeps? If so, you should be good now.
On Sep 12, 2012, at 4:08 AM, PBLN RAO <[email protected]> wrote: > Justin, > > find the attached file which i used to time update. > After commenting the Print statement in "Sec2TC" function. maya is responding. > > But i used your Qtimer as you suggested. > > On Tuesday, September 11, 2012 8:45:30 PM UTC+5:30, Justin Israel wrote: > I would need to see a snippet of your code to know why it isn't updating the > label from a single manual operation. But once you get that working properly, > you can start a QTimer to do the updates: > http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtimer.html > > It uses the event loop. You would connect the timeout signal to your update > slot. > > self.timer = QtCore.QTimer(self) > self.timer.timeout.connect(self.updateLabel) > self.timer.start(1000) > > > > > On Sep 11, 2012, at 5:28 AM, PBLN RAO <[email protected]> wrote: > >> Hi, >> >> I just wanted to create a timer display in Maya. >> >> I have a tool which i have docked to "right" >> >> I added a label to the window and tried to display the counter. i am echoing >> the result. >> >> i could able to see the result in the script editor but the label never gets >> updated and also maya doesn't respond to any of the task. >> >> how can i make it to run separately so that i can work in maya and the timer >> gets updated as well (like we see time in some webpages). >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > <timemechine.py> -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
