Use the whole screen of the HTML page.

Guido Moonen info at TNGSoftware.nl
Sat Oct 12 08:35:57 UTC 2013


Hello,

Is it possible to use the whole page of the webbrowser and the qmlweb 
javascript? do I need to set something special in the top width/height 
of qml?

I currently have html:
<html>
<head>
   <title>Lets try some QML stuffs.</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <style>
         html,body
         {
             height: 100%;
             width: 100%;
             padding: 0px;
             margin: 0px;
         }
     </style>


   <script type="text/javascript" src="js/parser.js"></script>
   <script type="text/javascript" src="js/process.js"></script>
   <script type="text/javascript" src="js/import.js"></script>
   <script type="text/javascript" src="js/qtcore.js"></script>
</head>
<body>
   <script type="text/javascript">

     var qmlEngine = new QMLEngine();
     qmlEngine.loadFile("main.qml");
     qmlEngine.start();
   </script>
</body>
</html>

and qml:
import QtQuick 2.0

Rectangle {
   Text {
     anchors.centerIn: parent
     text: "Hello World"
   }
   MouseArea {
     anchors.fill: parent
     onClicked: {
     }
   }
}

But when I look in the browser debug I see that the body got a new style:
<body style="height: 0px; width: 0px; position: relative; top: 0px; 
left: 0px; overflow: hidden;">

I assume this is done by the qmlEngine?

Is there an easy way to change this so I can use the full screen?

With kind regards ,
   Guido Moonen




-- 
TNG Software
van den Hummelstraat 34
5175 CM Loon op Zand
info at TNGSoftware.nl
06-26912345




More information about the QmlWeb mailing list