Example: Notify user of errors
Before, the widget simply failed silently, which gave the impression that the widget is broken. Change-Id: I8ab7ed0e0a62f9643791b6f4732f7f3b2cd7521a Reviewed-by: Martin Smith <martin.smith@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
d13a7a1f89
commit
404b7dbe3f
@@ -49,6 +49,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAbstractButton;
|
||||
class QSlider;
|
||||
class QLabel;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class VideoPlayer : public QWidget
|
||||
@@ -67,11 +68,13 @@ private slots:
|
||||
void positionChanged(qint64 position);
|
||||
void durationChanged(qint64 duration);
|
||||
void setPosition(int position);
|
||||
void handleError();
|
||||
|
||||
private:
|
||||
QMediaPlayer mediaPlayer;
|
||||
QAbstractButton *playButton;
|
||||
QSlider *positionSlider;
|
||||
QLabel *errorLabel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user