SlideShare a Scribd company logo
Ring Documentation, Release 1.10
65.36 Printing using QPrinter
In this example we will learn how to print to PDF file using QPrinter
Load "guilib.ring"
new qApp {
win1 = new qwidget() {
setwindowtitle("Printer")
setgeometry(100,100,500,500)
myweb = new qwebview(win1) {
setgeometry(100,100,1000,500)
loadpage(new qurl("http://google.com"))
}
new qpushbutton(win1) {
setGeometry(20,20,100,30)
settext("Print")
setclickevent("print()")
}
showmaximized()
65.36. Printing using QPrinter 728
Ring Documentation, Release 1.10
}
exec()
}
func print
printer1 = new qPrinter(0) {
setoutputformat(1) # 1 = pdf
setoutputfilename("test.pdf")
painter = new qpainter() {
begin(printer1)
myfont = new qfont("Times",50,-1,0)
setfont(myfont)
drawtext(100,100,"test")
printer1.newpage()
drawtext(100,100,"test2")
endpaint()
}
}
printer1 = new qPrinter(0) {
setoutputformat(1)
setoutputfilename("test2.pdf")
myweb.print(printer1)
myweb.show()
}
system ("test.pdf")
system ("test2.pdf")
65.37 Using QPrintPreviewDialog
In this example we will learn how to use the QPrintPreviewDialog class.
Example:
load "guilib.ring"
new qApp {
win1 = new qwidget() {
setwindowtitle("Printer Preview Dialog")
setgeometry(100,100,800,880)
printer1 = new qPrinter(0)
show()
oPreview = new qPrintPreviewDialog(printer1) {
setParent(win1)
move(10,10)
setPaintrequestedevent("printPreview()")
exec()
}
}
exec()
}
func printPreview
printer1 {
painter = new qpainter() {
65.37. Using QPrintPreviewDialog 729
Ring Documentation, Release 1.10
begin(printer1)
myfont = new qfont("Times",50,-1,0)
setfont(myfont)
drawtext(100,100,"Test - Page (1)")
printer1.newpage()
drawtext(100,100,"Test - Page (2)")
printer1.newpage()
myfont2 = new qfont("Times",14,-1,0)
setfont(myfont2)
for x = 1 to 30
drawtext(100,100+(20*x),"Number : " + x)
next
endpaint()
}
}
Screen Shot:
65.37. Using QPrintPreviewDialog 730
Ring Documentation, Release 1.10
65.38 Creating More than one Window
The next example demonstrates how to create more than one window
Load "guilib.ring"
app1 = new qapp {
win1 = new qwidget() {
65.38. Creating More than one Window 731
Ring Documentation, Release 1.10
setwindowtitle("First")
setgeometry(100,100,500,500)
new qpushbutton(win1) {
setgeometry(100,100,100,30)
settext("close")
setclickevent("app1.quit()")
}
new qpushbutton(win1) {
setgeometry(250,100,100,30)
settext("Second")
setclickevent("second()")
}
showmaximized()
}
exec()
}
func second
win2 = new qwidget() {
setwindowtitle("Second")
setgeometry(100,100,500,500)
setwindowflags(Qt_dialog)
show()
}
The application during the runtime
65.39 Playing Sound
Example:
65.39. Playing Sound 732
Ring Documentation, Release 1.10
Load "guilib.ring"
new qapp {
win1 = new qwidget() {
setwindowtitle("play sound!") show()
}
new qmediaplayer() {
setmedia(new qurl("footstep.wav"))
setvolume(50) play()
}
exec()
}
65.40 Using the QColorDialog Class
Example:
Load "guilib.ring"
oApp = new myapp { start() }
Class MyApp
oColor win1
Func start
myapp = new qapp
win1 = new qMainWindow() {
setwindowtitle("Color Dialog")
setgeometry(100,100,400,400)
}
new qpushbutton(win1) {
setgeometry(10,10,100,30)
settext("Get Color")
setclickevent("oApp.pColor()")
}
win1.show()
myapp.exec()
Func pColor
myobj = new qcolordialog()
aColor = myobj.GetColor()
r=acolor[1] g=acolor[2] b=acolor[3]
win1.setstylesheet("background-color: rgb("+r+", " + g+ "," + b + ")")
The application during the runtime
65.40. Using the QColorDialog Class 733
Ring Documentation, Release 1.10
65.41 Using qLCDNumber Class
In this example we will learn about using the qLCDNumber class
Load "guilib.ring"
New qApp
{
win1 = new qWidget()
{
setwindowtitle("LCD Number")
setgeometry(100,100,250,120)
new qLCDNumber(win1)
{
setgeometry(10,10,100,40)
display(100)
}
new qLCDNumber(win1)
{
setgeometry(10,60,100,40)
display(80)
}
show()
}
exec()
}
65.41. Using qLCDNumber Class 734
Ring Documentation, Release 1.10
The application during the runtime
65.42 Movable Label Example
Load "guilib.ring"
new qApp {
win1 = new qWidget()
{
label1 = new qLabel(win1)
{
setText("Welcome")
setgeometry(10,10,200,50)
setstylesheet("color: purple ; font-size: 30pt;")
}
new qTimer(win1)
{
setInterVal(10)
setTimeOutEvent("pMove()")
start()
}
setWindowTitle("Movable Label")
setgeometry(100,100,600,80)
setStyleSheet("background-color: white;")
show()
}
exec()
}
Func pMove
label1
{
move(x()+1,y())
if x() > 600
move(10,y())
ok
}
The application during the runtime
65.42. Movable Label Example 735
Ring Documentation, Release 1.10
65.43 QMessagebox Example
In this section we will learn how to check the output of the Message box
Load "guilib.ring"
new qApp {
win1 = new qWidget()
{
label1 = new qpushbutton(win1)
{
setText("Test")
setgeometry(10,10,200,50)
setstylesheet("color: purple ; font-size: 30pt;")
setclickevent("pWork()")
}
setWindowTitle("Messagebox")
setgeometry(100,100,600,80)
setStyleSheet("background-color: white;")
show()
}
exec()
}
func pWork
new qmessagebox(win1)
{
setwindowtitle("messagebox title")
settext("messagebox text")
setInformativeText("Do you want to save your changes?")
setstandardbuttons(QMessageBox_Yes | QMessageBox_No | QMessageBox_Close)
result = exec()
win1 {
if result = QMessageBox_Yes
setwindowtitle("Yes")
but result = QMessageBox_No
setwindowtitle("No")
but result = QMessageBox_Close
setwindowtitle("Close")
ok
}
}
The application during the runtime
65.43. QMessagebox Example 736
Ring Documentation, Release 1.10
65.44 Using QInputDialog Class
In the next example we will learn about using the QInputDialog class
Load "guilib.ring"
New QApp {
Win1 = New QWidget () {
SetGeometry(100,100,400,400)
SetWindowTitle("Input Dialog")
New QPushButton(win1)
{
SetText ("Input Dialog")
SetGeometry(100,100,100,30)
SetClickEvent("pWork()")
}
Show()
}
exec()
}
Func pWork
oInput = New QInputDialog(win1)
{
setwindowtitle("What is your name?")
setgeometry(100,100,400,50)
setlabeltext("User Name")
settextvalue("Mahmoud")
lcheck = exec()
65.44. Using QInputDialog Class 737

More Related Content

PDF
The Ring programming language version 1.3 book - Part 48 of 88
PDF
The Ring programming language version 1.2 book - Part 41 of 84
PDF
The Ring programming language version 1.5.2 book - Part 63 of 181
PDF
The Ring programming language version 1.8 book - Part 70 of 202
PDF
The Ring programming language version 1.2 book - Part 46 of 84
PDF
The Ring programming language version 1.7 book - Part 68 of 196
PDF
The Ring programming language version 1.5.2 book - Part 62 of 181
PDF
The Ring programming language version 1.3 book - Part 47 of 88
The Ring programming language version 1.3 book - Part 48 of 88
The Ring programming language version 1.2 book - Part 41 of 84
The Ring programming language version 1.5.2 book - Part 63 of 181
The Ring programming language version 1.8 book - Part 70 of 202
The Ring programming language version 1.2 book - Part 46 of 84
The Ring programming language version 1.7 book - Part 68 of 196
The Ring programming language version 1.5.2 book - Part 62 of 181
The Ring programming language version 1.3 book - Part 47 of 88

What's hot (20)

PDF
The Ring programming language version 1.2 book - Part 48 of 84
PDF
The Ring programming language version 1.10 book - Part 76 of 212
PDF
The Ring programming language version 1.2 book - Part 49 of 84
PDF
The Ring programming language version 1.9 book - Part 76 of 210
PDF
The Ring programming language version 1.2 book - Part 47 of 84
PDF
The Ring programming language version 1.8 book - Part 69 of 202
PDF
The Ring programming language version 1.4.1 book - Part 17 of 31
PDF
The Ring programming language version 1.9 book - Part 75 of 210
PDF
The Ring programming language version 1.5.3 book - Part 70 of 184
PDF
The Ring programming language version 1.5.4 book - Part 67 of 185
PDF
The Ring programming language version 1.2 book - Part 45 of 84
PDF
The Ring programming language version 1.4.1 book - Part 18 of 31
PDF
The Ring programming language version 1.3 book - Part 44 of 88
PDF
The Ring programming language version 1.7 book - Part 67 of 196
PDF
The Ring programming language version 1.5.4 book - Part 68 of 185
PDF
The Ring programming language version 1.5.2 book - Part 60 of 181
PDF
The Ring programming language version 1.7 book - Part 69 of 196
PDF
The Ring programming language version 1.3 book - Part 45 of 88
PDF
The Ring programming language version 1.5.2 book - Part 59 of 181
PDF
The Ring programming language version 1.5.2 book - Part 64 of 181
The Ring programming language version 1.2 book - Part 48 of 84
The Ring programming language version 1.10 book - Part 76 of 212
The Ring programming language version 1.2 book - Part 49 of 84
The Ring programming language version 1.9 book - Part 76 of 210
The Ring programming language version 1.2 book - Part 47 of 84
The Ring programming language version 1.8 book - Part 69 of 202
The Ring programming language version 1.4.1 book - Part 17 of 31
The Ring programming language version 1.9 book - Part 75 of 210
The Ring programming language version 1.5.3 book - Part 70 of 184
The Ring programming language version 1.5.4 book - Part 67 of 185
The Ring programming language version 1.2 book - Part 45 of 84
The Ring programming language version 1.4.1 book - Part 18 of 31
The Ring programming language version 1.3 book - Part 44 of 88
The Ring programming language version 1.7 book - Part 67 of 196
The Ring programming language version 1.5.4 book - Part 68 of 185
The Ring programming language version 1.5.2 book - Part 60 of 181
The Ring programming language version 1.7 book - Part 69 of 196
The Ring programming language version 1.3 book - Part 45 of 88
The Ring programming language version 1.5.2 book - Part 59 of 181
The Ring programming language version 1.5.2 book - Part 64 of 181
Ad

Similar to The Ring programming language version 1.10 book - Part 77 of 212 (20)

PDF
The Ring programming language version 1.5.3 book - Part 75 of 184
PDF
The Ring programming language version 1.5.4 book - Part 64 of 185
PDF
The Ring programming language version 1.8 book - Part 71 of 202
PDF
The Ring programming language version 1.5.1 book - Part 61 of 180
PDF
The Ring programming language version 1.7 book - Part 66 of 196
PDF
The Ring programming language version 1.5.2 book - Part 61 of 181
PDF
The Ring programming language version 1.10 book - Part 74 of 212
PDF
The Ring programming language version 1.6 book - Part 67 of 189
PDF
The Ring programming language version 1.10 book - Part 75 of 212
PDF
The Ring programming language version 1.8 book - Part 68 of 202
PDF
The Ring programming language version 1.7 book - Part 70 of 196
PDF
The Ring programming language version 1.5 book - Part 11 of 31
PDF
The Ring programming language version 1.8 book - Part 72 of 202
PDF
The Ring programming language version 1.7 book - Part 65 of 196
PDF
The Ring programming language version 1.8 book - Part 67 of 202
PDF
The Ring programming language version 1.5.3 book - Part 76 of 184
PDF
The Ring programming language version 1.4 book - Part 17 of 30
PDF
The Ring programming language version 1.9 book - Part 73 of 210
PDF
The Ring programming language version 1.3 book - Part 49 of 88
PDF
The Ring programming language version 1.5.4 book - Part 63 of 185
The Ring programming language version 1.5.3 book - Part 75 of 184
The Ring programming language version 1.5.4 book - Part 64 of 185
The Ring programming language version 1.8 book - Part 71 of 202
The Ring programming language version 1.5.1 book - Part 61 of 180
The Ring programming language version 1.7 book - Part 66 of 196
The Ring programming language version 1.5.2 book - Part 61 of 181
The Ring programming language version 1.10 book - Part 74 of 212
The Ring programming language version 1.6 book - Part 67 of 189
The Ring programming language version 1.10 book - Part 75 of 212
The Ring programming language version 1.8 book - Part 68 of 202
The Ring programming language version 1.7 book - Part 70 of 196
The Ring programming language version 1.5 book - Part 11 of 31
The Ring programming language version 1.8 book - Part 72 of 202
The Ring programming language version 1.7 book - Part 65 of 196
The Ring programming language version 1.8 book - Part 67 of 202
The Ring programming language version 1.5.3 book - Part 76 of 184
The Ring programming language version 1.4 book - Part 17 of 30
The Ring programming language version 1.9 book - Part 73 of 210
The Ring programming language version 1.3 book - Part 49 of 88
The Ring programming language version 1.5.4 book - Part 63 of 185
Ad

More from Mahmoud Samir Fayed (20)

PDF
The Ring programming language version 1.10 book - Part 212 of 212
PDF
The Ring programming language version 1.10 book - Part 211 of 212
PDF
The Ring programming language version 1.10 book - Part 210 of 212
PDF
The Ring programming language version 1.10 book - Part 208 of 212
PDF
The Ring programming language version 1.10 book - Part 207 of 212
PDF
The Ring programming language version 1.10 book - Part 205 of 212
PDF
The Ring programming language version 1.10 book - Part 206 of 212
PDF
The Ring programming language version 1.10 book - Part 204 of 212
PDF
The Ring programming language version 1.10 book - Part 203 of 212
PDF
The Ring programming language version 1.10 book - Part 202 of 212
PDF
The Ring programming language version 1.10 book - Part 201 of 212
PDF
The Ring programming language version 1.10 book - Part 200 of 212
PDF
The Ring programming language version 1.10 book - Part 199 of 212
PDF
The Ring programming language version 1.10 book - Part 198 of 212
PDF
The Ring programming language version 1.10 book - Part 197 of 212
PDF
The Ring programming language version 1.10 book - Part 196 of 212
PDF
The Ring programming language version 1.10 book - Part 195 of 212
PDF
The Ring programming language version 1.10 book - Part 194 of 212
PDF
The Ring programming language version 1.10 book - Part 193 of 212
PDF
The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 192 of 212

Recently uploaded (20)

PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Nekopoi APK 2025 free lastest update
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
AI in Product Development-omnex systems
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ai tools demonstartion for schools and inter college
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Digital Strategies for Manufacturing Companies
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Introduction to Artificial Intelligence
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
top salesforce developer skills in 2025.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
VVF-Customer-Presentation2025-Ver1.9.pptx
Nekopoi APK 2025 free lastest update
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
AI in Product Development-omnex systems
Which alternative to Crystal Reports is best for small or large businesses.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ai tools demonstartion for schools and inter college
Design an Analysis of Algorithms I-SECS-1021-03
Digital Strategies for Manufacturing Companies
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Introduction to Artificial Intelligence
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PTS Company Brochure 2025 (1).pdf.......
top salesforce developer skills in 2025.pdf
Transform Your Business with a Software ERP System
Design an Analysis of Algorithms II-SECS-1021-03
How to Migrate SBCGlobal Email to Yahoo Easily
Reimagine Home Health with the Power of Agentic AI​
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises

The Ring programming language version 1.10 book - Part 77 of 212

  • 1. Ring Documentation, Release 1.10 65.36 Printing using QPrinter In this example we will learn how to print to PDF file using QPrinter Load "guilib.ring" new qApp { win1 = new qwidget() { setwindowtitle("Printer") setgeometry(100,100,500,500) myweb = new qwebview(win1) { setgeometry(100,100,1000,500) loadpage(new qurl("http://google.com")) } new qpushbutton(win1) { setGeometry(20,20,100,30) settext("Print") setclickevent("print()") } showmaximized() 65.36. Printing using QPrinter 728
  • 2. Ring Documentation, Release 1.10 } exec() } func print printer1 = new qPrinter(0) { setoutputformat(1) # 1 = pdf setoutputfilename("test.pdf") painter = new qpainter() { begin(printer1) myfont = new qfont("Times",50,-1,0) setfont(myfont) drawtext(100,100,"test") printer1.newpage() drawtext(100,100,"test2") endpaint() } } printer1 = new qPrinter(0) { setoutputformat(1) setoutputfilename("test2.pdf") myweb.print(printer1) myweb.show() } system ("test.pdf") system ("test2.pdf") 65.37 Using QPrintPreviewDialog In this example we will learn how to use the QPrintPreviewDialog class. Example: load "guilib.ring" new qApp { win1 = new qwidget() { setwindowtitle("Printer Preview Dialog") setgeometry(100,100,800,880) printer1 = new qPrinter(0) show() oPreview = new qPrintPreviewDialog(printer1) { setParent(win1) move(10,10) setPaintrequestedevent("printPreview()") exec() } } exec() } func printPreview printer1 { painter = new qpainter() { 65.37. Using QPrintPreviewDialog 729
  • 3. Ring Documentation, Release 1.10 begin(printer1) myfont = new qfont("Times",50,-1,0) setfont(myfont) drawtext(100,100,"Test - Page (1)") printer1.newpage() drawtext(100,100,"Test - Page (2)") printer1.newpage() myfont2 = new qfont("Times",14,-1,0) setfont(myfont2) for x = 1 to 30 drawtext(100,100+(20*x),"Number : " + x) next endpaint() } } Screen Shot: 65.37. Using QPrintPreviewDialog 730
  • 4. Ring Documentation, Release 1.10 65.38 Creating More than one Window The next example demonstrates how to create more than one window Load "guilib.ring" app1 = new qapp { win1 = new qwidget() { 65.38. Creating More than one Window 731
  • 5. Ring Documentation, Release 1.10 setwindowtitle("First") setgeometry(100,100,500,500) new qpushbutton(win1) { setgeometry(100,100,100,30) settext("close") setclickevent("app1.quit()") } new qpushbutton(win1) { setgeometry(250,100,100,30) settext("Second") setclickevent("second()") } showmaximized() } exec() } func second win2 = new qwidget() { setwindowtitle("Second") setgeometry(100,100,500,500) setwindowflags(Qt_dialog) show() } The application during the runtime 65.39 Playing Sound Example: 65.39. Playing Sound 732
  • 6. Ring Documentation, Release 1.10 Load "guilib.ring" new qapp { win1 = new qwidget() { setwindowtitle("play sound!") show() } new qmediaplayer() { setmedia(new qurl("footstep.wav")) setvolume(50) play() } exec() } 65.40 Using the QColorDialog Class Example: Load "guilib.ring" oApp = new myapp { start() } Class MyApp oColor win1 Func start myapp = new qapp win1 = new qMainWindow() { setwindowtitle("Color Dialog") setgeometry(100,100,400,400) } new qpushbutton(win1) { setgeometry(10,10,100,30) settext("Get Color") setclickevent("oApp.pColor()") } win1.show() myapp.exec() Func pColor myobj = new qcolordialog() aColor = myobj.GetColor() r=acolor[1] g=acolor[2] b=acolor[3] win1.setstylesheet("background-color: rgb("+r+", " + g+ "," + b + ")") The application during the runtime 65.40. Using the QColorDialog Class 733
  • 7. Ring Documentation, Release 1.10 65.41 Using qLCDNumber Class In this example we will learn about using the qLCDNumber class Load "guilib.ring" New qApp { win1 = new qWidget() { setwindowtitle("LCD Number") setgeometry(100,100,250,120) new qLCDNumber(win1) { setgeometry(10,10,100,40) display(100) } new qLCDNumber(win1) { setgeometry(10,60,100,40) display(80) } show() } exec() } 65.41. Using qLCDNumber Class 734
  • 8. Ring Documentation, Release 1.10 The application during the runtime 65.42 Movable Label Example Load "guilib.ring" new qApp { win1 = new qWidget() { label1 = new qLabel(win1) { setText("Welcome") setgeometry(10,10,200,50) setstylesheet("color: purple ; font-size: 30pt;") } new qTimer(win1) { setInterVal(10) setTimeOutEvent("pMove()") start() } setWindowTitle("Movable Label") setgeometry(100,100,600,80) setStyleSheet("background-color: white;") show() } exec() } Func pMove label1 { move(x()+1,y()) if x() > 600 move(10,y()) ok } The application during the runtime 65.42. Movable Label Example 735
  • 9. Ring Documentation, Release 1.10 65.43 QMessagebox Example In this section we will learn how to check the output of the Message box Load "guilib.ring" new qApp { win1 = new qWidget() { label1 = new qpushbutton(win1) { setText("Test") setgeometry(10,10,200,50) setstylesheet("color: purple ; font-size: 30pt;") setclickevent("pWork()") } setWindowTitle("Messagebox") setgeometry(100,100,600,80) setStyleSheet("background-color: white;") show() } exec() } func pWork new qmessagebox(win1) { setwindowtitle("messagebox title") settext("messagebox text") setInformativeText("Do you want to save your changes?") setstandardbuttons(QMessageBox_Yes | QMessageBox_No | QMessageBox_Close) result = exec() win1 { if result = QMessageBox_Yes setwindowtitle("Yes") but result = QMessageBox_No setwindowtitle("No") but result = QMessageBox_Close setwindowtitle("Close") ok } } The application during the runtime 65.43. QMessagebox Example 736
  • 10. Ring Documentation, Release 1.10 65.44 Using QInputDialog Class In the next example we will learn about using the QInputDialog class Load "guilib.ring" New QApp { Win1 = New QWidget () { SetGeometry(100,100,400,400) SetWindowTitle("Input Dialog") New QPushButton(win1) { SetText ("Input Dialog") SetGeometry(100,100,100,30) SetClickEvent("pWork()") } Show() } exec() } Func pWork oInput = New QInputDialog(win1) { setwindowtitle("What is your name?") setgeometry(100,100,400,50) setlabeltext("User Name") settextvalue("Mahmoud") lcheck = exec() 65.44. Using QInputDialog Class 737