+ if (_appwidget_count <= 0) {
+ std::cerr << "ERROR: No main widgets exist. You must create and show() " <<
+ "an AppWidget for the Application before calling " <<
+ "Application::run().\n";
+ ::exit(1);
+ }
+
+ while (_appwidget_count > 0) {
+ dispatchEvents();
+ if (_appwidget_count <= 0)
+ break;
+ Timer::dispatchTimers(); // fire pending events
+ }