Err? You want it to be enabled or disabled?
Auto raise is disabled (false) by default. You can enable it by setting it to true.

Qt Code:
  1. #include <QtGui>
  2.  
  3. int main(int argc, char *argv[])
  4. {
  5. QApplication a(argc, argv);
  6.  
  7. // button 1 (on the left), auto raise disabled
  8.  
  9. // button 2 (on the right), auto raise enabled
  10. b2->setAutoRaise(true);
  11.  
  12. s.addWidget(b1);
  13. s.addWidget(b2);
  14. s.show();
  15.  
  16. a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
  17. return a.exec();
  18. }
To copy to clipboard, switch view to plain text mode