-1

While creating a MediaPlayer file in PyQt6 using Qt6 designer. Facing the problem with QMediaConent file. QMediaContent module is not active so that it can be used and it's giving error. Traceback (most recent call last): File "filenam.py", line 32, in play_video media = QMediaPlayer.Media(QMediaContent(video_url)) AttributeError: type object 'QMediaPlayer' has no attribute 'Media' Aborted (core dumped)

i m using PyQt6.5 version and Qt6 designer. PyQt6 installed and uninstalled but of no use.

please somebody help resolving.

PyQt6 installed and uninstalled but of no use.

Deepti
  • 1
  • 1
  • QMediaContent only existed in Qt5, and even in that version QMediaPlayer had no `Media` object/attribute/enum. Use `setSource()` with a valid QUrl and study the [documentation](https://doc.qt.io/qt-6/qmediaplayer.html) more carefully. – musicamante Aug 25 '23 at 19:08

0 Answers0