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. QCamera with QWidgets possible?
Forum Updated to NodeBB v4.3 + New Features

QCamera with QWidgets possible?

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 2 Posters 1.8k Views 2 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.
  • M Offline
    M Offline
    Marek
    wrote on last edited by
    #1

    Hi

    Does QCamera works with QWidget apps? This bug report suggests that Qt Widgets and Qt Multimedia is not supported.
    Camera example (qtwidgets) from examples has black viewFinder, QML camera example works.

    Best Regards
    Marek

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

      Hi,

      Are you targeting Android ?

      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
      • M Offline
        M Offline
        Marek
        wrote on last edited by
        #3

        Android and iOS and It would be very good if it runs on Windows Mobile.

        Camera is for Qr Code recognition, I'm using QZXing projecct.

        Today I have tested QZXingLive example with QML camera and merged this with declarative camera example, using

            view = new QQuickWidget(ui->scanPage);
            ui->scanPageLayout->addWidget(view);
            view->setSource(QUrl("qrc:/declarative-camera.qml"));
            view->show();
        

        My app is based on QWidgets, so I added QQuickWidget to one of QStackedWidget pages it looks like it works, but I haven't done anything in QML yet, so it's new for me, I will probably have more questions tomorrow.

        Is this generally good approach? I would like to avoid rewriting the whole app to QML

        Best Regards
        Marek

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

          Yes, It's one way to implement it.

          It's likely a problem between the QVideoFrame format selected for the camera and the one the QCameraViewfinder supports.

          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
          • M Offline
            M Offline
            Marek
            wrote on last edited by
            #5

            "It's likely a problem between the QVideoFrame format selected for the camera and the one the QCameraViewfinder supports."

            that is true if I use QCamera with QWidgets

            will my QML approach works on iOS and possibly Windows Mobile?

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

              I think so for iOS, I don't know for Windows Mobile. Never developed for that platform.

              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
              1
              • M Offline
                M Offline
                Marek
                wrote on last edited by
                #7

                Yes, I never did Windows Mobile either ;)

                Best Regards
                Marek

                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