robgeek
2nd April 2015, 02:54
Hello!
Somebody, please, tell me why i'm getting the following error message when i try to run my program:
#include <QFileDialog>
#include <QString>
//...code...
void MyData::on_openButton_clicked( )
{
QString filePath = QFileDialog::getOpenfileName(this, tr("Open File"), "D:/Texts/", tr("Text Files (*.txt)"));
//...rest of the code
}
D:\Programming\C-C++\Qt\Windows\mydata.cpp:43: error: 'getOpenfileName' is not a member of 'QFileDialog'
QString filePath = QFileDialog::getOpenfileName(this, tr("Open File"), "D:/Texts/", tr("Text Files (*.txt)"));
^
Thanks!
Somebody, please, tell me why i'm getting the following error message when i try to run my program:
#include <QFileDialog>
#include <QString>
//...code...
void MyData::on_openButton_clicked( )
{
QString filePath = QFileDialog::getOpenfileName(this, tr("Open File"), "D:/Texts/", tr("Text Files (*.txt)"));
//...rest of the code
}
D:\Programming\C-C++\Qt\Windows\mydata.cpp:43: error: 'getOpenfileName' is not a member of 'QFileDialog'
QString filePath = QFileDialog::getOpenfileName(this, tr("Open File"), "D:/Texts/", tr("Text Files (*.txt)"));
^
Thanks!