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 display camera preview full screen and maintain aspect ratio
Forum Updated to NodeBB v4.3 + New Features

How to display camera preview full screen and maintain aspect ratio

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    econtech
    wrote on last edited by
    #1

    Hi,

    I am used QAbstractVideoSurface for getting the camera buffer. My camera resolution is 640*480.
    The window is displayed the preview in center part of the screen.

    How can I change the preview display area to full screen and maintain the aspect radio.

    I am created camera widget and loaded in the qml file.

    I tried the calculation of aspect ratio. But the display area is not changed. I struck this for long time.

    Its very helpful somebody give the solution for this problem.

    Thanks,

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please don't post the same question twice

      Closing this one

      "Duplicate":http://qt-project.org/forums/viewthread/41981/

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - 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