Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED][VLC]Fullscreen video
Forum Updated to NodeBB v4.3 + New Features

[SOLVED][VLC]Fullscreen video

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yacinoben
    wrote on last edited by Yacinoben
    #1

    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 !

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        Yacinoben
        wrote on last edited by Yacinoben
        #3

        #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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved