[Interest] Regarding auto resizing of the QtQuick window for embedded device

Jha Sonakumar Sona.Jha at TechMahindra.com
Thu Nov 6 09:55:52 CET 2014


Hi,


Let me explain my problem clearly. 2000x800 has come from the below existing code in my application main.qml.


Window {
    id: root
    visible: true
    width: 2000
    height: 800


        SplitView {
            anchors.fill: parent
            orientation: Qt.Horizontal

            Item {
                id: driveInfo
                width: 1000
                height: 800


                Layout.minimumWidth: 640
                Layout.fillWidth: true
                Layout.minimumHeight: 480
                Layout.fillHeight: true

              .......
               ....
            }


            Item {
                id: ivi

                width: 1000
                height: 800

                Layout.fillWidth: true

                Layout.fillHeight: true
               .......
               .......
                }
       }
}


I would like to see 2000*480 to fit both displays by modifying the top width and height. However, it scales to full screen. am testing on HD monitor display having resolution 1920X1080.


Inorder to achieve 1000*480 on each of split view displays, Do I need to set any environment variable on embedded linux with eglfs as QPA plugin?


I tried to set using environment variables mentioned in http://qt-project.org/doc/qt-5/embedded-linux.html with no success.


Please let me know if there is any solution for the same in this regard.


Thanks and Regards,

Sona


________________________________
From: Filip Piechocki <fpiechocki at gmail.com>
Sent: Wednesday, November 5, 2014 6:11 PM
To: Jha Sonakumar
Cc: interest at qt-project.org Interest
Subject: Re: [Interest] Regarding auto resizing of the QtQuick window for embedded device

I give up :) If you've found that you can set some environment variables and they are described on this page - what more can I tell? Just read this page. And I don't know what width and height you've set. And I don't know where those 2000x800 come from. To be honest - now I am not sure what the problem is. How can I help you then?

On Wed, Nov 5, 2014 at 1:35 PM, Jha Sonakumar <Sona.Jha at techmahindra.com<mailto:Sona.Jha at techmahindra.com>> wrote:

We already set the width and height.

________________________________
From: Filip Piechocki <fpiechocki at gmail.com<mailto:fpiechocki at gmail.com>>
Sent: Wednesday, November 5, 2014 6:00 PM

To: Jha Sonakumar
Cc: interest at qt-project.org<mailto:interest at qt-project.org> Interest
Subject: Re: [Interest] Regarding auto resizing of the QtQuick window for embedded device

How you know that currently it uses 2000x800?

On Wed, Nov 5, 2014 at 12:09 PM, Jha Sonakumar <Sona.Jha at techmahindra.com<mailto:Sona.Jha at techmahindra.com>> wrote:

Hi Filip

My display is HD Monitor is 1920X1080,we'd like to connect twin lcd displays each of 1280X480. I would like ensure,whether my application window will fit to the display or not.

Currently my application uses widthxheight :(2000x800)

Is there environment-variable to be set ?


BR

SonaKumar


________________________________
From: Filip Piechocki <fpiechocki at gmail.com<mailto:fpiechocki at gmail.com>>
Sent: Wednesday, November 5, 2014 4:28 PM

To: Jha Sonakumar
Cc: interest at qt-project.org<mailto:interest at qt-project.org> Interest
Subject: Re: [Interest] Regarding auto resizing of the QtQuick window for embedded device

Like I said - your Window will always be covering whole screen. That's how the 'eglfs' plugin works. Why do you want it to cover only a part of screen?

On Wed, Nov 5, 2014 at 11:47 AM, Jha Sonakumar <Sona.Jha at techmahindra.com<mailto:Sona.Jha at techmahindra.com>> wrote:

Hi Filip

i tried with the following code:

Window {
    visible: true
    width: 1200
    height: 480

    Rectangle{
        id:rect
        color:"black"
        anchors.fill: parent

        Item {
            anchors.centerIn: parent
            width: 800
            height: 480
            focus:true

            Audio {
                id: player
                source:"qrc:/Neela Yevaru.mp3"
                autoPlay: true
                muted: false
            }

            Keys.onSpacePressed: playPauseMedia()

            function playPauseMedia(){
                switch(player.playbackState) {
                case Audio.PlayingState:
                    player.pause()
                    console.log("Paused media")
                    break
                case Audio.PausedState:
                    player.play()
                    console.log("Playing media")
                    break
                default:
                    break
                }

            }
        }
    }
}


still result is same


BR

Sona

________________________________
From: Filip Piechocki <fpiechocki at gmail.com<mailto:fpiechocki at gmail.com>>
Sent: Wednesday, November 5, 2014 3:36 PM
To: Jha Sonakumar
Cc: interest at qt-project.org<mailto:interest at qt-project.org> Interest

Subject: Re: [Interest] Regarding auto resizing of the QtQuick window for embedded device

That's what I thought as with linuxfb you won't be able to use QtQuick 2.x as it requires OpenGL.
So with 'eglfs' your application is displayed on the whole frame buffer and so it covers whole screen. So anything you type as width and height of the root element has no meaning as it will be resized to whole screen. I you want it smaller then you might wrap your main element with Rectangle. Something like this:

Window {
  Rectangle {
    anchors.fill: parent
    color: "black"

    Item { // this item is representig the main item of your application
      anchors.centerIn: parent
      width: 2560
      height: 480
    }
  }
}

You application will stiil be full screen, but the content will be resized inside this black rectangle.

On Wed, Nov 5, 2014 at 10:52 AM, Jha Sonakumar <Sona.Jha at techmahindra.com<mailto:Sona.Jha at techmahindra.com>> wrote:

Hi Filip,


you are right, i am using eglfs Yocto


BR

SonaKumar

________________________________
From: interest-bounces+sona.jha=techmahindra.com at qt-project.org<mailto:techmahindra.com at qt-project.org> <interest-bounces+sona.jha=techmahindra.com at qt-project.org<mailto:techmahindra.com at qt-project.org>> on behalf of Filip Piechocki <fpiechocki at gmail.com<mailto:fpiechocki at gmail.com>>
Sent: Wednesday, November 5, 2014 3:18 PM
To: Jha Sonakumar; interest at qt-project.org<mailto:interest at qt-project.org> Interest

Subject: Re: [Interest] Regarding auto resizing of the QtQuick window for embedded device



On Wed, Nov 5, 2014 at 10:32 AM, Jha Sonakumar <Sona.Jha at techmahindra.com<mailto:Sona.Jha at techmahindra.com>> wrote:

sory.. what do u mean by QPA?

Platform Abstraction plugin. Are you using X11? If yes then you are probably using 'xcb' QPA plugin, but I guess you are not using X11, a then 'eglfs' plugin is what you use, right?


________________________________
From: interest-bounces+sona.jha=techmahindra.com at qt-project.org<mailto:techmahindra.com at qt-project.org> <interest-bounces+sona.jha=techmahindra.com at qt-project.org<mailto:techmahindra.com at qt-project.org>> on behalf of Filip Piechocki <fpiechocki at gmail.com<mailto:fpiechocki at gmail.com>>
Sent: Wednesday, November 5, 2014 2:56 PM
To: Jha Sonakumar
Cc: interest at qt-project.org<mailto:interest at qt-project.org>
Subject: Re: [Interest] Regarding auto resizing of the QtQuick window for embedded device

Hi,
What QPA plugin are you using?

BR,
Filip

On Wed, Nov 5, 2014 at 10:17 AM, Jha Sonakumar <Sona.Jha at techmahindra.com<mailto:Sona.Jha at techmahindra.com>> wrote:

Hi All,


I have developed an application using QtQuick 2.0 for IMX 6 board. The view window has been automatically resized to cover whole display irrespective of specified width height.


Display size  :(2560X800)


But i need to show the QtQuick window of size (2560X480).



Would you please guide me to resolve the issue.



Best Regards

SonaKumar

________________________________
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================

_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest



________________________________
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================


________________________________
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================


________________________________
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================


________________________________
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================


________________________________
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================



============================================================================================================================
Disclaimer:  This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141106/1b89ef9e/attachment.html>


More information about the Interest mailing list