PyQt5 full screen and pyqt5 full screen

Source: Internet
Author: User

PyQt5 full screen and pyqt5 full screen

Install this on Windows:
Https://pypi.python.org/pypi/PyQt5
Enter this in Ubuntu:
Sudo apt-get install python3-pyqt5

Or enter pip install pyqt5.

Basic test code:

1 import sys2 from PyQt5.QtWidgets import QWidget, QApplication3 4 app = QApplication (sys. argv) 5 w = QWidget () 6 w. show () 7 w. setWindowTitle ("Hello PyQt5") 8 sys.exit(app.exe c _())

Display image:

1 app = QtWidgets. QApplication (sys. argv) # The pyqt window must use 2 label = QtWidgets in the QApplication method. QLabel () 3 # label. resize (1920,1080) 4 # label. show () 5 label. showFullScreen () # Full Screen Display 6 img = QtGui. QPixmap ('d:/cur/proj/j20/3.jpg '). scaled (label. width (), label. height () 7 label. setPixmap (img)

It takes about 6 ms for the image to be displayed during actual measurement.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.