[Interest] QML size conversion not working
Jason H
jhihn at gmx.com
Mon Dec 21 16:54:36 CET 2015
Per http://doc.qt.io/qt-5/qml-size.html, I should be able to set the size using a string "WIDTHxHEIGHT" but this has never worked. Only Qt.size(width, height).
Is this a bug or am I doing something wrong?
camera.videoRecorder.resolution = Qt.size(targetResolution.width, targetResolution.height); // works
Generates:
RecordVideoScreen.qml:179 (onTargetResolutionChanged): QSizeF(720, 480)
RecordVideoScreen.qml:181 (onTargetResolutionChanged): qml: resolution set to: QSize(720, 480)
camera.videoRecorder.resolution = targetResolution.width + "x" + targetResolution.height; // does not work
Generates:
RecordVideoScreen.qml:179 (onTargetResolutionChanged): qml: 720x480
RecordVideoScreen.qml:181 (onTargetResolutionChanged): qml: resolution set to: QSize(-1, -1)
More information about the Interest
mailing list