QFileDialog error message



  • Hi,
    I have the following line

        QString newFile = QFileDialog::getOpenFileName(this,tr("Open Image"),QString(),tr("Images (*.png *.xpm *.jpg *.bmp"));
    

    which generates the following error message:
    C:\Programming\Projects\Folkfriends_1_0\mydelegate.cpp:167: error: no matching function for call to 'QFileDialog::getOpenFileName(myDelegate*, QString, const char [10], QString)'
    QString newFile = QFileDialog::getOpenFileName(this,tr("Open Image"),"/Pictures",tr("Images (*.png *.xpm *.jpg *.bmp"));

    I have QFileDialog with the includes.
    What is incorrect?
    Thank you.


  • Qt Champions 2017

    Your first argument type may be wrong. It accepts qwidget type. You must be passing different type


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.