-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple.sh
More file actions
executable file
·33 lines (27 loc) · 769 Bytes
/
Copy pathsimple.sh
File metadata and controls
executable file
·33 lines (27 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
source bash_qt.sh
qt_init
shell_clicked() {
echo "Line=`qt $lineedit.text`"
qts sig_end
}
msgbox_clicked() {
qts QtGui.QMessageBox.information null "Textbox Contents" "`qt $lineedit.text`"
qts sig_end
}
window=`qt QtGui.QWidget`
vbox=`qt QtGui.QVBoxLayout`
hbox=`qt QtGui.QHBoxLayout`
button1=`qt QtGui.QPushButton 'Print in shell'`
button2=`qt QtGui.QPushButton 'Display in MessageBox'`
lineedit=`qt QtGui.QLineEdit`
qt_signal $button1 "clicked()" shell_clicked
qt_signal $button2 "clicked()" msgbox_clicked
qts ${hbox}.addWidget $button1
qts ${hbox}.addWidget $button2
qts ${vbox}.addWidget $lineedit
qts ${vbox}.addLayout $hbox
qts ${window}.setLayout $vbox
qts ${window}.setWindowTitle "Simple bash-Qt Test Program"
qts ${window}.show
qt_exec