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)
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-corner-widget-example
- Owner: yjg30737
- License: mit
- Created: 2022-06-02T05:58:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-02T06:11:13.000Z (almost 4 years ago)
- Last Synced: 2025-04-03T02:03:57.180Z (11 months ago)
- Topics: pyqt, pyqt-examples, pyqt-gui, pyqt5, pyqt5-examples, pyqt5-tutorial, qevent, qshowevent, qt, qt5, qwidget
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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

Maximize

After resize

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.