[SOLVED][VLC]Fullscreen video



  • Hello,
    There's no method to show a VlcWidgetVideo in fullscreen ?
    #ifndef PRINCIPAL_H
    #define PRINCIPAL_H

    #include <QMainWindow>
    #include <QLibrary>
    #include <QMainWindow>
    #include <QtWidgets>
    #include <vlc/VLCQtCore/Instance.h>
    #include <vlc/VLCQtCore/MediaPlayer.h>
    #include <vlc/VLCQtCore/Media.h>
    #include <vlc/VLCQtCore/Common.h>

    namespace Ui {
    class Principal;
    }

    class Principal : public QMainWindow
    {
    Q_OBJECT

    public:
    explicit Principal(QWidget *parent = 0);
    ~Principal();
    public slots:
    void player();

    private :
    VlcMedia * _media;
    VlcInstance* _instance;
    VlcMediaPlayer* _player;

    Ui::Principal *ui;

    protected:
    void keyPressEvent(QKeyEvent *event);
    void mouseDoubleClickEvent(QMouseEvent *event);
    };

    #endif // PRINCIPAL_H

    thanks !


  • Lifetime Qt Champion

    Hi,

    That will partly depend on your widgets setup. Note that showFullScreen might be what you are looking for.

    Hope it helps



  • #include "principal.h"
    #include "ui_principal.h"

    Principal::Principal(QWidget *parent) :
    QMainWindow(parent), ui(new Ui::Principal)
    {
    ui->setupUi(this);
    _instance = new VlcInstance(VlcCommon::args(), this);
    _player = new VlcMediaPlayer(_instance);
    _player->setVideoWidget(ui->widget);
    ui->widget->setMediaPlayer(_player);
    connect(ui->actionAjouter_video, SIGNAL(triggered()), this, SLOT(player()));
    }

    The program contains QVlcWidgetVideo, QPushButton(play, equalizer, pause, reset) and menu bar, all in layouts.

    ui->widget->showFullScreen() doesn't work.


  • Lifetime Qt Champion

    It's a widget in a layout, you can't just show it fullscreen


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.