title: I can't get my error message box to work in pyqt
body: <p>In my init function, i've defined an error message box like this:</p>
  
  <pre><code> self.error_msg = QtGui.QMessageBox()
   self.error_msg.setIcon(QtGui.QMessageBox.critical)
   self.error_msg.setWindowTitle("Error")
   self.error_msg.setDetailedText("")
  </code></pre>
  
  <p>on a different method, I try to call the message box like this, by setting the error text:</p>
  
  <pre><code>def detectRoot(self):
      euid = os.geteuid()
      if euid != 0:
          print "need to be root to run this program"
          self.logger.error("Not root, program exited")
          self.error_msg.setText("You need to be root to run this program")
          self.error_msg.exec_()
          exit(1)
  </code></pre>
  
  <p>However, I keep getting message a pyqt/python error: </p>
  
  <pre><code>self.error_msg.setIcon(QtGui.QMessageBox.critical)
  TypeError: QMessageBox.setIcon(QMessageBox.Icon): argument 1 has unexpected type 'builtin_function_or_method'
  </code></pre>