Skip to content

Commit

Permalink
expose the browse() function properly
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Aug 23, 2023
1 parent 0283a74 commit 380816a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pythena.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def __init__(self):
quit_action.triggered.connect(self.quit)
toolbar.addAction(quit_action)

def browse(t):
file = qw.QFileDialog.getOpenFileName(self, "Select File", "")[0]
t.setText(file)

if False:
label = qw.QLabel('Athena Version: [deprecating]')
radio_layout.addWidget(label)
Expand All @@ -81,9 +85,6 @@ def __init__(self):
label.setStyleSheet("font-weight: bold")
btn = qw.QPushButton(self)
btn.setText("browse")
def browse(t):
file = qw.QFileDialog.getOpenFileName(self, "Select File", "")[0]
t.setText(file)
self.exe = qw.QLineEdit(self)
btn.clicked.connect(lambda: browse(self.exe))
self.exe.setFixedWidth(250)
Expand Down

0 comments on commit 380816a

Please sign in to comment.