Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to generate QR code in Cpp ?
Forum Update on Monday, May 27th 2025

How to generate QR code in Cpp ?

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 2 Posters 4.6k 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.
  • S Offline
    S Offline
    Saikumar
    wrote on 28 Dec 2017, 08:08 last edited by
    #1

    I would like to generate QR code by taking string input from the user. Can anyone suggest reference for the QR code and also how to dowload pods.pri file.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 28 Dec 2017, 08:55 last edited by
      #2

      Hi
      you could use an existing library
      https://github.com/fukuchi/libqrencode

      • how to dowload pods.pri file.

      I have zero idea what pods.pri files are :)

      S 1 Reply Last reply 28 Dec 2017, 09:05
      1
      • M mrjj
        28 Dec 2017, 08:55

        Hi
        you could use an existing library
        https://github.com/fukuchi/libqrencode

        • how to dowload pods.pri file.

        I have zero idea what pods.pri files are :)

        S Offline
        S Offline
        Saikumar
        wrote on 28 Dec 2017, 09:05 last edited by
        #3

        @mrjj
        I have downloaded libqrencode file already. But getting errors.
        [0_1514451884337_mainwindow.cpp](Uploading 100%)
        Errors screenshot :0_1514451857269_error1.png

        S 1 Reply Last reply 28 Dec 2017, 09:10
        0
        • S Saikumar
          28 Dec 2017, 09:05

          @mrjj
          I have downloaded libqrencode file already. But getting errors.
          [0_1514451884337_mainwindow.cpp](Uploading 100%)
          Errors screenshot :0_1514451857269_error1.png

          S Offline
          S Offline
          Saikumar
          wrote on 28 Dec 2017, 09:10 last edited by
          #4

          @Saikumar
          My Program :
          0_1514452014293_img1.png 0_1514452019517_img2.png

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 28 Dec 2017, 09:15 last edited by mrjj
            #5

            Hi
            You both have Mainwindow AND QWidget in constructor that seems odd.?
            alt text

            S 1 Reply Last reply 28 Dec 2017, 09:29
            0
            • M mrjj
              28 Dec 2017, 09:15

              Hi
              You both have Mainwindow AND QWidget in constructor that seems odd.?
              alt text

              S Offline
              S Offline
              Saikumar
              wrote on 28 Dec 2017, 09:29 last edited by
              #6

              @mrjj
              I have removed that line then also I am getting errors...
              Mainly on data variable name

              M 1 Reply Last reply 28 Dec 2017, 09:46
              0
              • S Saikumar
                28 Dec 2017, 09:29

                @mrjj
                I have removed that line then also I am getting errors...
                Mainly on data variable name

                M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 28 Dec 2017, 09:46 last edited by
                #7

                @Saikumar
                what data variable ?
                the
                data.toStdString() one ?

                should just be a member
                QString data of mainwindow it seems.

                S 1 Reply Last reply 28 Dec 2017, 09:52
                0
                • M mrjj
                  28 Dec 2017, 09:46

                  @Saikumar
                  what data variable ?
                  the
                  data.toStdString() one ?

                  should just be a member
                  QString data of mainwindow it seems.

                  S Offline
                  S Offline
                  Saikumar
                  wrote on 28 Dec 2017, 09:52 last edited by
                  #8

                  @mrjj
                  It's taking it as QWidgetData private variable that's why it is giving mainwindow doesn't have any data variable name. How to resolve this problem. Getting conflict on the data . It's saying data is private variable. But when assigning getting error Qstring can't be convert to QWidgetData type on this line this->data=data .

                  M 1 Reply Last reply 28 Dec 2017, 09:53
                  0
                  • S Saikumar
                    28 Dec 2017, 09:52

                    @mrjj
                    It's taking it as QWidgetData private variable that's why it is giving mainwindow doesn't have any data variable name. How to resolve this problem. Getting conflict on the data . It's saying data is private variable. But when assigning getting error Qstring can't be convert to QWidgetData type on this line this->data=data .

                    M Offline
                    M Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on 28 Dec 2017, 09:53 last edited by
                    #9

                    @Saikumar
                    Hi
                    I think there is a name conflict between a string name data and something else
                    please rename your data string.

                    S 1 Reply Last reply 29 Dec 2017, 08:55
                    1
                    • M mrjj
                      28 Dec 2017, 09:53

                      @Saikumar
                      Hi
                      I think there is a name conflict between a string name data and something else
                      please rename your data string.

                      S Offline
                      S Offline
                      Saikumar
                      wrote on 29 Dec 2017, 08:55 last edited by
                      #10

                      @mrjj
                      Hii,
                      I have created data variable in my program.
                      Its working now.

                      Thank you.

                      1 Reply Last reply
                      1

                      1/10

                      28 Dec 2017, 08:08

                      • Login

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