Advertisement
Guest User

Kamerazähler PyQt5

a guest
Jun 25th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. from PyQt5.QtGui import *
  2. from PyQt5.QtWidgets import *
  3. from PyQt5.QtCore import *
  4. import PyQt5
  5. import sys
  6. import os
  7. from PyQt5.QtMultimedia import QCameraInfo
  8.  
  9. class MainWindow(QMainWindow):
  10. def __init__(self, *args, **kwargs):
  11. super(MainWindow, self).__init__(*args, **kwargs)
  12. self.Kamerazaehlen()
  13.  
  14. def Kamerazaehlen(self):
  15. online_webcams = QCameraInfo.availableCameras()
  16. print(online_webcams)
  17.  
  18. if __name__ == '__main__':
  19. app = QApplication(sys.argv)
  20. app.setApplicationName("Webcam")
  21. windwow = MainWindow()
  22. app.exec_()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement