I am using PyQt4 for GUI in my application.
I want to know how can make my window maximized by default.
I goggled but did not found an alternate.
I tried using below code, but its not for maximized instead it resizes the window to desktop screen size.
But i need the effect which we will see when we press the maximize button wt right side of the window title bar.
screen = QtGui.QDesktopWidget().screenGeometry() self.setGeometry(0, 0, screen.width(), screen.height())
Advantages of PySide PySide represents the official set of Python bindings backed up by the Qt Company. PySide comes with a license under the LGPL, meaning it is simpler to incorporate into commercial projects when compared with PyQt. It allows the programmer to use QtQuick or QML to establish the user interface.
PyQt is significantly older than PySide and, partially due to that, has a larger community and is usually ahead when it comes to adopting new developments. It is mainly developed by Riverbank Computing Limited and distributed under GPL v3 and a commercial license.
We set the window size using the setGeometry(left,top,width,height) method. The window title is set using setWindowTitle(title). Finally show() is called to display the window.
From the docs:
self.showMaximized()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With