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()
{
dialog.exec();
}
void ConfigDlg::chooseSrcDir()
{
QFileDialog dialog(this);
dialog.setFileMode( QFileDialog::DirectoryOnly );
dialog.exec();
}
To copy to clipboard, switch view to plain text mode
where ConfigDlg inherits from QDialod so:
#ifndef __CONFIGDLG_H__
#define __CONFIGDLG_H__
#include "GeneratedFiles/ui_configDlg.h"
#include <QDialog>
{
Q_OBJECT
public:
virtual ~ConfigDlg();
private slots:
void chooseSrcDir();
void chooseOutputDir();
protected:
private:
Ui::configDlg ui;
};
#endif __CONFIGDLG_H__.
#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__.
To copy to clipboard, switch view to plain text mode
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
Bookmarks