forked from DCAN-Labs/file-mapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
destination_window_gui.py
71 lines (50 loc) · 1.47 KB
/
destination_window_gui.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /usr/bin/python3
import sys
from PyQt4.QtGui import *
from PyQt4 import QtGui
from PyQt4 import QtCore
def on_click(self):
folder1 = QFileDialog.getExistingDirectory(QWidget(), 'Open Folder', '/')
textbox1.setText(folder1)
# create our window
app = QApplication(sys.argv)
w = QWidget()
w.setWindowTitle('Choose destination for selected key')
w.resize(850, 500)
num=5
statbox = []
for s in range(num):
statbox.append(QLineEdit(w))
statbox[s].setReadOnly(True)
statbox[s].move(30,20+(80*s))
statbox[s].resize(180,40)
textbox = []
for t in range(num):
textbox.append(QLineEdit(w))
textbox[t].move(170,20+(80*t))
textbox[t].resize(280,40)
button = []
for b in range(num):
button.append(QPushButton('Browse'))
button[b].move(500,25+(80*b))
button[b].resize(80,40)
for bc in button:
bc.clicked.connect(on_click)
buttonWidget = QWidget()
layout = QVBoxLayout()
AbsButton = QRadioButton("Absolute Path")
RelButton = QRadioButton("Relative Path")
RadioGroup= QButtonGroup(buttonWidget)
RadioGroup.addButton(AbsButton)
RadioGroup.addButton(RelButton)
RadioGroup.setExclusive(True)
buttonWidget.move(30,20)
buttonWidget.resize(180,80)
layout.addWidget(AbsButton)
layout.addWidget(RelButton)
buttons = QtGui.QDialogButtonBox(
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel,
QtCore.Qt.Horizontal)
# Show the window and run the app
w.show()
app.exec_()