There is definitely such a method in QApplication.