Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to change camera or capture resolution in Qt6 ?
Forum Updated to NodeBB v4.3 + New Features

How to change camera or capture resolution in Qt6 ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 130 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LZHD
    wrote on last edited by
    #1

    Camera has cameraFormat.resolution property , and it not read-only in documentation.
    // by binding
    cameraFormat.resolution:Qt.size(1080,1440) it will be "Invalid property assignment: "resolution" is a read-only property",
    // by javascript
    camera.cameraFormat.resolution = Qt.size(1080,1440) // Error: Cannot assign QSizeF to QSize
    camera.cameraFormat.resolution = "1080x1440" // Error: Cannot assign QString to QSize
    Qt5 Imagecapture has supportedResolutions and resolution properties, Qt6 insteal.
    how to do it in Qt6 ?

    jsulmJ 1 Reply Last reply
    0
    • L LZHD

      Camera has cameraFormat.resolution property , and it not read-only in documentation.
      // by binding
      cameraFormat.resolution:Qt.size(1080,1440) it will be "Invalid property assignment: "resolution" is a read-only property",
      // by javascript
      camera.cameraFormat.resolution = Qt.size(1080,1440) // Error: Cannot assign QSizeF to QSize
      camera.cameraFormat.resolution = "1080x1440" // Error: Cannot assign QString to QSize
      Qt5 Imagecapture has supportedResolutions and resolution properties, Qt6 insteal.
      how to do it in Qt6 ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @LZHD For video recording there is https://doc.qt.io/qt-6/qml-qtmultimedia-mediarecorder.html which has https://doc.qt.io/qt-6/qml-qtmultimedia-mediarecorder.html#videoResolution-prop
      Also see https://doc.qt.io/qt-6/qml-qtmultimedia-capturesession.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved