tags:

views:

252

answers:

2

As an old Borland C++ Bulder coder who has moved to Linux, I was very pleased to find QT and QT Creator.

But I have fallen at the first hurdle: I have designed a form, with some controls, and added a menu. Now, when the user selects menu File/Open, I would like to display a file selection menu - and I can't see how.

It's obviously a simple problem, so if someone could point me right, I would be grateful.

+1  A: 

Maybe that could help: http://doc.trolltech.com/4.6/dialogs-findfiles.html

elr
+1  A: 

include the QFileDialog

#include <QFileDialog>

then on any method you can write something like this

QString path = QFileDialog::getExistingDirectory (this, tr("Directory"), directory.path());
if ( path.isNull() == false )
{
    directory.setPath(path);
}

for more information see this

Ahmed Kotb
20 minutes and two answers. Gotta love this site.(I came back to cancel the question, having finally found the answer, but you guys had beaten me to it. Thanks!Btw, my mistake was looking for a file dialog component to drag onto my form)
Mawg