Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. BUG in QCameraViewfinder
Qt 6.11 is out! See what's new in the release blog

BUG in QCameraViewfinder

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 772 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.
  • R Offline
    R Offline
    RenanHm
    wrote on last edited by
    #1

    Hello .. I'm trying to display the image from the Android cell phone camera and later capture a photo.

    My problem is in displaying the camera image in QCameraViewfinder. Simply the camera image does not appear. See below:

    WhatsApp Image 2023-03-21 at 11.07.11.jpeg

    I'm using a very basic code just to test this problem. See my code:

    int main( int argc, char ** argv ) {
    
        QApplication a( argc, argv );
    
        QWidget *wid = new QWidget;
        QCamera *cam = new QCamera();
        QCameraViewfinder *vf = new QCameraViewfinder(wid);
        cam->setViewfinder(vf);
        vf->showMaximized();
        wid->showMaximized();
        cam->start();
    
        return a.exec();
    }
    
    

    Detail that I can take the picture and save it in QImage. It just doesn't display the camera image at runtime.

    I also noticed that a QT example does not display the camera image.

    I use QT 5.14.2

    QT bug or am I doing something wrong?

    jsulmJ 1 Reply Last reply
    0
    • R RenanHm

      Hello .. I'm trying to display the image from the Android cell phone camera and later capture a photo.

      My problem is in displaying the camera image in QCameraViewfinder. Simply the camera image does not appear. See below:

      WhatsApp Image 2023-03-21 at 11.07.11.jpeg

      I'm using a very basic code just to test this problem. See my code:

      int main( int argc, char ** argv ) {
      
          QApplication a( argc, argv );
      
          QWidget *wid = new QWidget;
          QCamera *cam = new QCamera();
          QCameraViewfinder *vf = new QCameraViewfinder(wid);
          cam->setViewfinder(vf);
          vf->showMaximized();
          wid->showMaximized();
          cam->start();
      
          return a.exec();
      }
      
      

      Detail that I can take the picture and save it in QImage. It just doesn't display the camera image at runtime.

      I also noticed that a QT example does not display the camera image.

      I use QT 5.14.2

      QT bug or am I doing something wrong?

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

      @RenanHm said in BUG in QCameraViewfinder:

      I use QT 5.14.2

      You should try with a more recent Qt version. Android is a fast moving target and older Qt versions may fail on recent Android versions.

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

      R 1 Reply Last reply
      0
      • jsulmJ jsulm

        @RenanHm said in BUG in QCameraViewfinder:

        I use QT 5.14.2

        You should try with a more recent Qt version. Android is a fast moving target and older Qt versions may fail on recent Android versions.

        R Offline
        R Offline
        RenanHm
        wrote on last edited by
        #3

        @jsulm So... changing the QT version whenever a BUG appears is complicated. Is there not a fix for this version 5.14.2?

        jsulmJ 1 Reply Last reply
        0
        • R RenanHm

          @jsulm So... changing the QT version whenever a BUG appears is complicated. Is there not a fix for this version 5.14.2?

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

          @RenanHm If there is really a bug in Qt 5.14.2 which was fixed then it will be in a later version (> 5.14.2). As I said: Android is changing quite fast.

          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