In the first part of this PyQt project, users will learn how to create a Qt window, by extending the QDialog class, and parent it to the Maya main window.
OS X Users: Add the following line below setWindowTitle to keep the dialog from falling behind the main window:
self.setWindowFlags(QtCore.Qt.Tool)
More - www.drtuts.com