Answer the question
In order to leave comments, you need to log in
How to forbid minimizing the program, making the window smaller?
I wrote only in such a way that it was impossible to close the program, the rest I have no idea how to do Is it
possible to simply remove them somehow or if there was a click, then it did nothing
Answer the question
In order to leave comments, you need to log in
Solved
It was necessary to write: self.setWindowFlags(QtCore.Qt.FramelessWindowHint|QtCore.Qt.WindowTitleHint)
That's how it's decided)
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import Qt
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.setGeometry(300, 300, 300, 200)
self.setWindowTitle('Example')
self.setWindowFlags(Qt.WindowMaximizeButtonHint)
if __name__ == '__main__':
app = QApplication(sys.argv)
example = Example()
example.show()
sys.exit(app.exec_())
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question