I'm learning pyQT and I have a problem with QFileDialog - how can I
get the selected filename? I've made a simple form: a pushbutton that
onlick runs function "test" which opens the filedialog (in
qtdesigner):
------------------------------
void Form1::test()
{
a = QFileDialog(self)
QObject.connect(a, SIGNAL('fileSelected()') ,self , SLOT('test2()'))
a.show()
}
-------------------------------
But when the widgets shows i get:
QObject::connect: No such signal QFileDialog::fileSelected()
QObject::connect:  (sender name:   'unnamed')
QObject::connect:  (receiver name: 'Form1')

test2 function looks like this:
--------------------------------------
void Form1::test2()
{
self.pushButton1.setText("aaaaaa")
}
--------------------------------------
1. how can I make it work?
2. how can I get the selected filename and display its name as
pushButton1 text? Will something like: SLOT("test2(a.selectedFile())")
work?
I'm using QT 3.3.4 and pyQT 3.15.1

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to