In Qt we tend to do something like this using signals and slots. The most straightforward way is to create a signal "dataValidChanged(bool)" and connect it to "setEnabled(bool)" slot of the button. Whenever validity of the data changes, you emit the signal and the button gets enabled or disabled properly. No need to do any periodic checks.
As for idle processing, this is usually done by using a timer with a 0 timeout. You can read a bit about it for example here: http://doc.trolltech.com/qq/qq27-res...blemstepbystep





Reply With Quote
Bookmarks