Question

I have a video output embedded in a QML view. It is working fine, but I want to make that video output go fullscreen when I click on it.

Every time, some images that are in the view (some sibiling, and some not) are visible on top of my video. In fact, it should fill the root element, and be at the front screen. Changing the z property doesn't do anything.

What is the best trick to make a video go fullscreen? When I switch from normal to fullscreen, the video should continue its flow with no interuption.

A solution only in QML (and no C++) would be preferable, as I build my QMLs by parsing XML files.

Was it helpful?

Solution 2

I finaly found the solution I needed. In fact it was simplier that it seemed. I created an Item just under the root, and I changed the parent of my video element when I wanted to go fullscreen. I put my new Item as the parent of my video element. I didnt know that we could change the parent of an element.

OTHER TIPS

You can create new fullscreen window from QtQuick.Window module and pass tpo that window video path,time and play.

Component {
    Window{
        id: videoWindow
        flags: Qt.FramelessWindowHint
        HereYourPlayer{

        }

    }
}

than you should create that Component and call videoWindow.showFullScreen()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top