Q
Q
qaporawer2017-05-30 15:37:42
Python
qaporawer, 2017-05-30 15:37:42

How to fix error when opening youtube frames in Pyqt?

In PyQT5, Python 3.6 using QWebEngineView I open a YouTube video through a frame

self.ui.web.setHtml('<iframe width="560" height="315" src="https://www.youtube.com/embed/'+youtubeurls[0]+'?autoplay=1" frameborder="0" allowfullscreen></iframe>')

The first video opens normally, but when you open the second one instead of the first one, the application crashes with the same line of code. Moreover, regardless of the rest of the code, and on what videos we watch. The first one always opens stably, the second crashes the application.
Why is this happening and how to fix it please?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question