Computer Science, asked by pankaj15513, 3 months ago

how to generate a QR co de using python with gui

write this program in python

you have already created then send me program​

Answers

Answered by Anonymous
8

Creating QR cōde - Python

So here in this question we are going to create a QR cōde using Python with GUI. In this program it required to takes texas input and creates a corresponding QR cōde png in the same directory.

Well, before start programming let's first know about that what is Python.

Python is a powerful high-level, object-oriented programming language created by Guido van Rossum. It has simple easy-to-use syntax, making it the perfect language for someone trying to learn computer programming for the first time.

\rule{300}{1}

Modules required

To run the below program first we need to instāll two modules, pyqrcōde and pypng by running below command in our shell.

\tt{>>> \: pip \: ins tall \: PyQrCo de}

\tt{>>> \: pip \: ins tall \: PyPng}

\rule{300}{1}

The Program

import pyqrcōde

from tkinter import *

import os

def create():

⠀ s=entvar.get()

⠀ url=pyqrcōde.create(s)

⠀ url.png("myqr.png",scale=8)

⠀ os.system("myqr.png")

root=Tk()

Label(root,text="Enter QR Cōde Text").grid(row=0,padx=20)

entvar=StringVar()

Entry(root,textvariable=entvar).grid(row=1,padx=10,pady=10)

Button(root,text="Create",command=create).grid(row=2,padx=20)

mainloop()

\rule{300}{1}

Do not copy-paste the exact c‎ōde and run it, there are some white-space and no-space characters that will need to be removed before use, I've entered them for the sake of showing indentations in the c‎ōde

Answered by juwairiyahimran18
0

Creating QR cōde - Python

So here in this question we are going to create a QR cōde using Python with GUI. In this program it required to takes texas input and creates a corresponding QR cōde png in the same directory.

Well, before start programming let's first know about that what is Python.

Python is a powerful high-level, object-oriented programming language created by Guido van Rossum. It has simple easy-to-use syntax, making it the perfect language for someone trying to learn computer programming for the first time.

Similar questions