By default the Qt::WindowContextHelpButtonHint flag is added to dialogs.
You can control this with the WindowFlags parameter to the dialog constructor.
For instance you can specify only the TitleHint and SystemMenu flags by doing:
QDialog *d = new QDialog(0, Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
d->exec();
If you add the Qt::WindowContextHelpButtonHint flag you will get the help button back.
In PyQt you can do:
from PyQt4 import QtGui, QtCore
app = QtGui.QApplication([])
d = QtGui.QDialog(None, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
d.exec_()
More details on window flags can be found on the WindowType enum in the Qt documentation.