Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
fieldOfView committed Oct 25, 2018
1 parent 9472a82 commit ec79a39
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions NetworkMJPGImage.py
@@ -1,8 +1,8 @@
# Copyright (c) 2018 Aldo Hoeben / fieldOfView
# NetworkMJPGImage is released under the terms of the LGPLv3 or higher.

from PyQt5.QtCore import QUrl, pyqtProperty, pyqtSignal, pyqtSlot, QRect
from PyQt5.QtGui import QImage
from PyQt5.QtCore import QUrl, pyqtProperty, pyqtSignal, pyqtSlot, QRect, QByteArray
from PyQt5.QtGui import QImage, QPainter
from PyQt5.QtQuick import QQuickPaintedItem
from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply, QNetworkAccessManager

Expand All @@ -17,11 +17,11 @@ class NetworkMJPGImage(QQuickPaintedItem):
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)

self._stream_buffer = b""
self._stream_buffer = QByteArray()
self._stream_buffer_start_index = -1
self._network_manager = None
self._image_request = None
self._image_reply = None
self._network_manager = None # type: QNetworkAccessManager
self._image_request = None # type: QNetworkRequest
self._image_reply = None # type: QNetworkReply
self._image = QImage()
self._image_rect = QRect()

Expand Down Expand Up @@ -99,7 +99,7 @@ def start(self) -> None:

@pyqtSlot()
def stop(self) -> None:
self._stream_buffer = b""
self._stream_buffer = QByteArray()
self._stream_buffer_start_index = -1

if self._image_reply:
Expand Down

0 comments on commit ec79a39

Please sign in to comment.