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. HowTo read QR Code - Qt Quick Controls 2 APP, mobile platforms
QtWS25 Last Chance

HowTo read QR Code - Qt Quick Controls 2 APP, mobile platforms

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qrcodebarcodemobileqtquickcontrols
19 Posts 8 Posters 12.2k 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.
  • ekkescornerE ekkescorner

    @tekojo thx.
    have you set HighDPI and Material ?
    in main.cpp:

    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
        qputenv("QT_QUICK_CONTROLS_STYLE", "material");
        QGuiApplication app(argc, argv);
    
    CharbyC Offline
    CharbyC Offline
    Charby
    wrote on last edited by
    #10

    @ekkescorner in addition to tekojo, you could also keep the zooming working by simply replacing "minimumValue" with "from" and "maximalValue" with "to". If I remember correctly the example was not operating with iOS because grabToImage was not working correctly at that time, I guess this should be no longer the case anyhow. It was working fine with Android. Regarding HighDpi and material, your code to activate seems good, did you experienced problem with it ? If that could help, during a previous meetup we did play with QtControls2 and the workshop material is here : https://github.com/a-team-fr/MeetupMobileQtQml/tree/master/160330
    If you are interested in I could share source code of an almost fully functional application (iOS and Android) with QrCode recognition. I planned to publish this app a few days before engin.io notification to ramp down (and the app is highly using it) so the project is useless but the camera part with QrCode could be helpful...

    ekkescornerE 1 Reply Last reply
    2
    • CharbyC Charby

      @ekkescorner in addition to tekojo, you could also keep the zooming working by simply replacing "minimumValue" with "from" and "maximalValue" with "to". If I remember correctly the example was not operating with iOS because grabToImage was not working correctly at that time, I guess this should be no longer the case anyhow. It was working fine with Android. Regarding HighDpi and material, your code to activate seems good, did you experienced problem with it ? If that could help, during a previous meetup we did play with QtControls2 and the workshop material is here : https://github.com/a-team-fr/MeetupMobileQtQml/tree/master/160330
      If you are interested in I could share source code of an almost fully functional application (iOS and Android) with QrCode recognition. I planned to publish this app a few days before engin.io notification to ramp down (and the app is highly using it) so the project is useless but the camera part with QrCode could be helpful...

      ekkescornerE Offline
      ekkescornerE Offline
      ekkescorner
      Qt Champions 2016
      wrote on last edited by
      #11

      @Charby hi - thx helping. I tested the existing project without any changes on Android (6.0 device) and wasn't able to get a QR Code recognized. tried manual, auto, ...
      also tried on iPhone6S w iOS10 and the app crashed.
      for now I run out of time - will do some more tests on tuesday in San Francisco

      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
      5.15 --> 6.8 https://t1p.de/ekkeChecklist
      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

      1 Reply Last reply
      0
      • ekkescornerE ekkescorner

        for the upcoming Qt World Summit Conference App there's a feature request to read Attendee Data from QR Code printed on badge.

        at first I thought this should be easy because reading and writing QR Code is common stuff for mobile apps these days.
        also have done with BlackBerry 10 Cascades (https://developer.blackberry.com/native/reference/cascades/bb__cascades__multimedia__barcodedetector.html) where some lines in QML did it. unfortunately Cascades isn't Open Source and targeted only to BlackBerry 10 devices

        seems there's no easy way to read QR Codes from a Qt 5.7 Qt Quick Controls 2 App running on Android, iOS, Windows10
        found some libraries targeted to 4.8, others with reported issues 'not running on mobile
        or found examples with Qt Widgets

        didn't found any Qt example app doing this for Qt Quick Controls 2 App on mobile platforms.
        perhaps I have overlooked something

        also have to mention that I never did any multimedia stuff yet with Qt 5.7 and never included a 3rd party library

        thanks for any hints, input, examples

        O Offline
        O Offline
        oniongarlic
        wrote on last edited by
        #12

        @ekkescorner I have a QAbstractVideoFilter based barcode filter using based on QZXing, works pretty very well. The code is a bit tied to an app that is not yet public (it will be eventually), but I put quickly together a git repo with the relevant sources, it builds but otherwise totally untested, available here https://github.com/oniongarlic/qt5-barcodevideofilter

        ekkescornerE 1 Reply Last reply
        0
        • O oniongarlic

          @ekkescorner I have a QAbstractVideoFilter based barcode filter using based on QZXing, works pretty very well. The code is a bit tied to an app that is not yet public (it will be eventually), but I put quickly together a git repo with the relevant sources, it builds but otherwise totally untested, available here https://github.com/oniongarlic/qt5-barcodevideofilter

          ekkescornerE Offline
          ekkescornerE Offline
          ekkescorner
          Qt Champions 2016
          wrote on last edited by ekkescorner
          #13

          @oniongarlic thx. just on my way to QtWorldSummit in san francisco.
          will try it out on tuesday.
          btw: have you tested on android and ios ?

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.8 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          O 1 Reply Last reply
          0
          • ekkescornerE ekkescorner

            @oniongarlic thx. just on my way to QtWorldSummit in san francisco.
            will try it out on tuesday.
            btw: have you tested on android and ios ?

            O Offline
            O Offline
            oniongarlic
            wrote on last edited by
            #14

            @ekkescorner I've tested my app that uses that code on Android & Desktop. I don't have any iOS devices but if QAbstractVideoFilters are usable on iOS then I don't see (than perhaps the raw image format, but then that "just" needs a converter) why it wouldn't work.

            ekkescornerE 1 Reply Last reply
            0
            • O oniongarlic

              @ekkescorner I've tested my app that uses that code on Android & Desktop. I don't have any iOS devices but if QAbstractVideoFilters are usable on iOS then I don't see (than perhaps the raw image format, but then that "just" needs a converter) why it wouldn't work.

              ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote on last edited by
              #15

              @oniongarlic thx again for your help. downloaded your repo and opened project in Qt Creator.
              set kits for android, osx and ios
              trying to build I'm getting symbols not found for OSX, some errors building for ios and uncount errors trying to build for android.

              at the moment have no idea howto go gon.
              howto get rid of the errors and howto include this lib into another app.
              do I have to copy all your content into my own app or do I have to build your lib and refer to this from other projects ?
              in this case do I need different builds for targeted platforms ?

              sorry for these questions - I'm not so familiar with this.

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.8 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              1 Reply Last reply
              0
              • lukas_kosinskiL Offline
                lukas_kosinskiL Offline
                lukas_kosinski
                wrote on last edited by
                #16

                Hi! Scanning, and generating QR/Bar codes is possible with SCodes library. It's based on latest ZXing C++ port, which has been adjusted to meet today's projects' requirements. You can read more about it here.

                B 1 Reply Last reply
                0
                • lukas_kosinskiL lukas_kosinski

                  Hi! Scanning, and generating QR/Bar codes is possible with SCodes library. It's based on latest ZXing C++ port, which has been adjusted to meet today's projects' requirements. You can read more about it here.

                  B Offline
                  B Offline
                  biskero
                  wrote on last edited by
                  #17

                  @lukas_kosinski any chance of a Qt/QML 6 porting ?

                  lukas_kosinskiL 1 Reply Last reply
                  0
                  • B biskero

                    @lukas_kosinski any chance of a Qt/QML 6 porting ?

                    lukas_kosinskiL Offline
                    lukas_kosinskiL Offline
                    lukas_kosinski
                    wrote on last edited by
                    #18

                    @biskero Definitely, it's already on my todo list.

                    ekkescornerE 1 Reply Last reply
                    2
                    • lukas_kosinskiL lukas_kosinski

                      @biskero Definitely, it's already on my todo list.

                      ekkescornerE Offline
                      ekkescornerE Offline
                      ekkescorner
                      Qt Champions 2016
                      wrote on last edited by
                      #19

                      @lukas_kosinski would also be great to have more codes - esp Code39 and EAN-Barcodes are essential for my apps

                      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                      5.15 --> 6.8 https://t1p.de/ekkeChecklist
                      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                      1 Reply Last reply
                      1

                      • Login

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