i've got issues trying to set up a new dialog from my main window passing a path argument, right now the dialog just flash and exit... I think the problem is where i show the windows but i can't figure out where i should put it!
In this XtractMainWindow.py file i set up the main window and get the path
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import ui_XtractMainWindow
import AndroidDialog
import sys
class XtractMainWindow(QMainWindow, ui_XtractMainWindow.Ui_XtractMainWindow):
def __init__(self, parent=None):
super(XtractMainWindow, self).__init__(parent)
self.setupUi(self)
self.androidXtractButton.clicked.connect(self.setAndroid)
def setAndroid(self):
filename = QFileDialog.getExistingDirectory(self, "Open Directory", "/home")
print filename
dialog = AndroidDialog.AndroidDialog(str(filename))
dialog.show()
app = QApplication(sys.argv)
form = XtractMainWindow()
form.show()
app.exec_()
This is the Dialog, in AndroidDialog.py file
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import csv
import sys
import Android_extractor
import ui_android_dialog
class AndroidDialog(QDialog, ui_android_dialog.Ui_androidDialog):
def __init__(self, filename, parent=None):
super(AndroidDialog, self).__init__(parent)
self.setupUi(self)
Thank you for any advice!