After creating a QInputDialog window using PyQt5, I can't hide the close button. I tried the following code : import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QApplication,QMainWindow,QInputDialog) if __name__=='__main__': app = QApplication(sys.argv) mainwindow = QMainWindow() mainwindow.show() window = QInputDialog() window.setWindowFlags(window.windowFlags() & Qt.WindowTitleHint & Qt.CustomizeWindowHint) window.exec_() sys.exit(app.exec_()) Continue reading...