Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

ring Desktop, WebAssembly and Mobile create an application to ask the user about his/her name.

load "guilib.ring"

oApp = new qApp {

        win1 = new qWidget() {

                setwindowtitle("Hello World")
                setGeometry(100,100,370,250)

                label1 = new qLabel(win1) {
                        settext("What is your name ?")
                        setGeometry(10,20,350,30)
                        setalignment(Qt_AlignHCenter)
                }

                btn1 = new qPushButton(win1) {
                        setGeometry(10,200,100,30)
                        settext("Say Hello")
                        setclickevent("pHello()")
                }

                btn2 = new qPushButton(win1) {
                        setGeometry(150,200,100,30)
                        settext("Close")
                        setclickevent("pClose()")
                }

                lineedit1 = new qLineEdit(win1) {
                        setGeometry(10,100,350,30)
                }

                show()
        }

        exec()
}

Func pHello
        lineedit1.settext( "Hello " + lineedit1.text())

Func pClose
        oApp.quit()
Comment

PREVIOUS NEXT
Code Example
Python :: ring Creating Reports using the WebLib and the GUILib 
Python :: Sum of diagonal elements of a matrix python without numpy 
Python :: plot a list of number in python 
Python :: install open3d jetson nano aarch64 
Python :: matplotlib plot dpi - change format to retina instead of svg 
Python :: dateentry python centered 
Python :: open file find and replace commas python 
Python :: django recapcha 
Python :: nth term of gp in python when 2,3 terms given 
Python :: django create ap 
Python :: poset save @reciever created 
Python :: Python Root finding code 
Python :: remove inner list from outer list python 
Python :: phone no validate 
Python :: creating a news app using djangio 
Python :: python how to dump exception stak 
Python :: python notification image 
Python :: reverse row order padnas 
Python :: how to add trailing zeros in the number 
Python :: silent plt.plot 
Python :: check if a variable is empty python 
Python :: snap pdf 
Python :: create graph, x y axis | graph plotting 
Python :: load python 
Python :: how to do a python loop 
Python :: python scrapy browser headers to dictionary 
Python :: accessing 2d list in python 
Python :: how to get each word in a string 
Python :: python Write a program to reverse an array or string 
Python :: python denest list of anything 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =