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 dialog- and I can't see how.
It's obviously a simple problem, so if someone could point me right, I would be grateful.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With