V
V
Vladislav Tikhonov2017-02-08 20:28:53
Python
Vladislav Tikhonov, 2017-02-08 20:28:53

PyQt4. How to minimize window on button click?

Hello. I recently started learning PyQt4. I decided to make a window without a frame, with my own buttons.
How do I implement the "collapse" button?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey6661313, 2017-02-09
@wolterx

# кнопка: http://pyqt.sourceforge.net/Docs/PyQt4/qpushbutton.html
min = QPushButton()

# минимизация:  http://pyqt.sourceforge.net/Docs/PyQt4/qwidget.html#showMinimized
def minimization():
    min.showMinimized()

# связывание с нажатием: http://pyqt.sourceforge.net/Docs/PyQt4/new_style_signals_slots.html
min.pressed.connect(minimization)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question