[Interest] QML Preview

Rutledge Shawn Shawn.Rutledge at theqtcompany.com
Tue Jan 27 09:01:37 CET 2015


>> Is there any way to have the external tool QML Preview take on a different
>> screen size?
> 
> I guess you're talking about qmlscene (the tool for Qt Quick 2): There's AFAIK
> no way to force a specific size from the command line, but you can play with the options
> 
> --maximized
> --fullscreen
> --resize-to-root

The older tool is qmlscene; the newer one is qml, which is a better habit to get into using, with some exceptions.  But neither one supports a -geometry parameter like widget apps do.  Maybe we should add that feature.

Of course you can write your own viewer in C++ (not many lines of code), force the size to whatever you like, wrap it in something that looks like the device bezel etc.

Or you can set the size of the top-level item or window in QML.

You might also need to adjust the QT_DEVICE_PIXEL_RATIO environment variable to simulate a high-DPI display.




More information about the Interest mailing list