Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFileDialog error message
Forum Updated to NodeBB v4.3 + New Features

QFileDialog error message

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 435 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gabor53
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

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

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      5

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved