An open API service indexing awesome lists of open source software.

https://github.com/yjg30737/pyqt-corner-widget-example

PyQt example which shows widget at the bottom-right corner of window (using event/geometry, no QGridLayout involved)
https://github.com/yjg30737/pyqt-corner-widget-example

pyqt pyqt-examples pyqt-gui pyqt5 pyqt5-examples pyqt5-tutorial qevent qshowevent qt qt5 qwidget

Last synced: about 2 months ago
JSON representation

PyQt example which shows widget at the bottom-right corner of window (using event/geometry, no QGridLayout involved)

Awesome Lists containing this project

README

          

# pyqt-corner-widget-example
PyQt example which shows widget at the bottom-right corner of window (using event/geometry, no QGridLayout involved)

This is just for example.

## Requirements
* PyQt5 >= 5.8

## Setup
`python -m pip install git+https://github.com/yjg30737/pyqt-corner-widget-example.git --upgrade`

## Example
```python
from PyQt5.QtWidgets import QApplication
from pyqt_corner_widget_example import MainWindow

if __name__ == "__main__":
import sys

app = QApplication(sys.argv)
w = MainWindow()
w.show()
app.exec_()
```

Result

Normal

![image](https://user-images.githubusercontent.com/55078043/171563818-a3fcae10-128c-42b9-b182-a8e9f1c3b0f1.png)

Maximize

![image](https://user-images.githubusercontent.com/55078043/171563860-be8be3b9-03d1-4a4c-a78d-47fef1fd58b0.png)

After resize

![image](https://user-images.githubusercontent.com/55078043/171563885-59a07dcf-3848-44fc-a709-f70188709d4f.png)

This also works when activating/deactivating the window, which means corner widget is completely synchronized with the main window.

## See Also
* pyqt-show-button-when-hover-widget - In this example, i used `QGridLayout` to set button's position at bottom right.