[PySide] Button order on QMessageBox

Jim Byrnes jf_byrnes at comcast.net
Tue Oct 28 19:03:01 CET 2014


Is the order of the buttons on a QMessageBox platform specific?

I ask because in the book Pyside GUI Application Development the example 
shows the buttons as  Yes/No but when I run the code the buttons show up 
No/Yes.  I am on linux and the examples appear to be on Windows.

Here is the code:

     def quitApp(self):
         """ Function to confirm a message from the user """
         userInfo = QMessageBox.question(self, 'Confirmation',
             "This will quit the application. Do you want to Continue",
             QMessageBox.Yes | QMessageBox.No)
         if userInfo == QMessageBox.Yes:
             myApp.quit()
         if userInfo == QMessageBox.No:
             pass

Thanks,  Jim




More information about the PySide mailing list