franco.amato
16th February 2010, 18:29
Hi I would like to open a dialog to allow the user to choose a directory.
At the moment I only wrote these line of code:
void ConfigDlg::chooseSrcDir()
{
QFileDialog dialog(this);
dialog.setFileMode( QFileDialog::DirectoryOnly );
dialog.exec();
}
where ConfigDlg inherits from QDialod so:
#ifndef __CONFIGDLG_H__
#define __CONFIGDLG_H__
#include "GeneratedFiles/ui_configDlg.h"
#include <QDialog>
class ConfigDlg : public QDialog
{
Q_OBJECT
public:
ConfigDlg( QWidget *parent );
virtual ~ConfigDlg();
private slots:
void chooseSrcDir();
void chooseOutputDir();
protected:
private:
Ui::configDlg ui;
};
#endif __CONFIGDLG_H__.
The exec doesn't display the dialog in native mode, but in Qt mode, and this is extremely slow on my machine.
How can I force Qt to show the dialog in native mode?
Best Regards,
Frank
At the moment I only wrote these line of code:
void ConfigDlg::chooseSrcDir()
{
QFileDialog dialog(this);
dialog.setFileMode( QFileDialog::DirectoryOnly );
dialog.exec();
}
where ConfigDlg inherits from QDialod so:
#ifndef __CONFIGDLG_H__
#define __CONFIGDLG_H__
#include "GeneratedFiles/ui_configDlg.h"
#include <QDialog>
class ConfigDlg : public QDialog
{
Q_OBJECT
public:
ConfigDlg( QWidget *parent );
virtual ~ConfigDlg();
private slots:
void chooseSrcDir();
void chooseOutputDir();
protected:
private:
Ui::configDlg ui;
};
#endif __CONFIGDLG_H__.
The exec doesn't display the dialog in native mode, but in Qt mode, and this is extremely slow on my machine.
How can I force Qt to show the dialog in native mode?
Best Regards,
Frank