Hi Anu! On 13.04.2010 22:54, Anu Ramachandra wrote: > I have a Qt application with a fileDialog. When a file is selected, I > would like to call a c++ procedure. > > The procedure is defined in a separate .cpp file which I added to the > 'Sources' section of the Qt project. > > How can the C++ procedure be called?
That’s done via signals and slots, a central Qt feature. [1] This is
very basic Qt; so I’d recommend you to read the tutorials,
documentation, help, examples, demonstrations and so on provided with Qt
and Qt Creator – they’re really great! You could e. g. start with the
Adressbook Tutorial [2]. Basically, the code would look like this:
connect(fileDialog, SIGNAL(fileSelected(QString)),
this, SLOT(slotFileSelected(QString)));
Furthermore, this is the Qt Creator mailing list – for general questions
on Qt (like this one), please use qt-interest. Thanks!
I hope this helps you.
Regards,
Robin
[1] http://doc.trolltech.com/4.6/signalsandslots.html
[2] http://doc.trolltech.com/4.6/tutorials-addressbook.html
--
Robin Krahl <[email protected]>
http://rkrahl.de
plain text & open source ftw!
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
