Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

ring 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 :: Lambda expressions using f-string 
Python :: notebook prevent cell output 
Python :: How to Load Any HuggingFace Model in spaCy 
Python :: python adx indicator 
Python :: matplotlib plot dpi - change format to svg 
Python :: circular ImportError: cannot import name 
Python :: how to create dataframe from rdd 
Python :: Use of OfficeApi 
Python :: python covert vtt subtittle to text txt file 
Python :: how to know google index of a page using python 
Python :: django date grater 
Python :: rĂșllandi veltandi standandi sitjandi 
Python :: trello class 
Python :: tens place in digit 
Python :: Quiver Simple Demo 
Python :: Capitalize first word of a phrase in python 
Python :: python generate random password 
Python :: python multilevel list comprehension 
Python :: get list of all document in django-elasticsearch-dsl 
Python :: how to take matrix input in python 
Python :: r Return each result with an index 
Python :: python autotrader web 
Python :: decode base64 password python 
Python :: Crop Image as Circle with transparent background 
Python :: _set.filter django 
Python :: rename multiple value in column in pandas 
Python :: accessing list elements in python 
Python :: python too many values to unpack 
Python :: python Least prime factor of numbers till n 
Python :: python workbook.add_format in percentage 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =