Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:23:34+00:00 2026-06-04T01:23:34+00:00

I am writing an application using <Phonon/VideoWidget> . I’d like to have two windows.

  • 0

I am writing an application using <Phonon/VideoWidget>.

I’d like to have two windows. One is the main window with controls for the video
And the other has the video itself. It will be displayed in another monitor. -fullscreen or not.

How can I make the video window – that can be moved or resizabled – with the video inside?

When not playing any video, the video window should display an image.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:23:35+00:00Added an answer on June 4, 2026 at 1:23 am

    In the end I didnt use QStackedWidget, I extended Phonon::VideoWidget and made this class…

    Heres the cpp:

    MyVideoWidget::MyVideoWidget(QWidget *parent) : Phonon::VideoWidget(parent)
    {
        label = new QLabel(this);
        label->setAutoFillBackground(true);
        label->setBackgroundRole(QPalette::Light);
        label->setScaledContents(true);
    }
    
    void MyVideoWidget::mouseDoubleClickEvent(QMouseEvent* event)
    {
        if(!this->isFullScreen())
            this->enterFullScreen();
        else
            this->setFullScreen(false);
    }
    
    void MyVideoWidget::keyPressEvent(QKeyEvent* event)
    {
        if(event->key() == Qt::Key_Escape)
        {
            if(!this->isFullScreen())
                this->enterFullScreen();
            else
                this->setFullScreen(false);
        }
    }
    
    void MyVideoWidget::enterImageMode(QString imagePath)
    {
        QPixmap pmap;
        pmap.fill(QColor(255, 255, 255));
        if(!pmap.load(imagePath))
        {
            label->setText("Erro ao carregar imagem: "+imagePath);
            if(!label->isVisible())
                    label->show();
            return;
        }
        label->setPixmap(pmap);
        if(!label->isVisible())
            label->show();
        repaint();
    }
    
    void MyVideoWidget::enterVideoMode()
    {
        label->hide();
    }
    
    void MyVideoWidget::resizeEvent(QResizeEvent* event)
    {
        Phonon::VideoWidget::resizeEvent(event);
        label->setGeometry(this->geometry());
        repaint();
    }
    
    MyVideoWidget::~MyVideoWidget() 
    {
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a windows application using VS2010 and C# 4.0. I have a MDI
I have been writing an application using ASP.Net MVC4, where the majority of the
I have problem concerning python packages and testing. I'm writing an application using wx
I'm writing an application using the public Tumblr API, just for fun. I have
I am writing an application using Symfony. I have some reusable components that I
I am writing an application using C# and I would like to read some
I am writing a C++ application using GTK and OpenGL. I have a GTK
I am writing a small application using Rails 3. In one part of it
I am writing one web application using PHP/CodeIginter. Now, I want to add a
I'm writing a Java application using Struts 2, but now I'd like to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.