1st Qt Quick - Porgram01
-
I have this code
import QtQuick 2.5 Rectangle { property alias mouseArea: mouseArea width: 500 height: 400 MouseArea { id: mouseArea anchors.fill: parent } Text { anchors.centerIn: parent text: "Click me" horizontalAlignment: Text.AlignHCenter } }
I expected that as the variable 'width' and 'height' are modify, the windows would increase/decrease in size accordingly, but the window display is always the same size. How can I change this program-behavior?
Thanks
-
Hi,
What do you mean by always the same size ?
-
OK, the generic window created by the default Qt Quick application, when creating from New Project->Quick Application->Choose...., has a certain size, I want to change the size of that window, better yet, I would like to display that window taking the full size of the screen.
I don't think I have to provide any code; since all one has to do is create a new project to see the generic window created and, thus, the code.Any help would be very much appreciated.
-
@Papa
Hi
It depends on what you have.
http://stackoverflow.com/questions/9014298/full-screen-desktop-application-with-qmlmaybe just ask qmlviewer to do it?
qmlviewer -fullscreen -frameless file.qml -
@mrjj said:
qmlviewer
Thanks for the advice, however, after reading this:
The QML Viewer is a tool for testing and developing QML applications. It is not intended for use in a production environment and should not be used for the deployment of QML applications. In those cases, the QML runtime should be invoked from a Qt application instead; see Qt Declarative UI Runtime for more information
link text
I think I am going to pass on the advice. -
well for deployment , you must use some of the
other methods mentioned in the link."I have this code" didn't sound like you were about to ship :)
So it also depends on you already have a c++ loader or not.
or want or not.