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.

有帮助吗?

解决方案 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.

其他提示

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()

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top