Код: Выделить всё
C:\QtProjects\MwendwaLB\customcard.cpp:40: error: no matching function for call to 'QImageReader::QImageReader(std::filesystem::__cxx11::path&)'
C:/QtProjects/MwendwaLB/customcard.cpp: In member function 'void CustomCard::setImage(std::filesystem::__cxx11::path&)':
C:/QtProjects/MwendwaLB/customcard.cpp:40:38: error: no matching function for call to 'QImageReader::QImageReader(std::filesystem::__cxx11::path&)'
40 | QImageReader imageReader(img_path);
| ^
Код: Выделить всё
void CustomCard::setImage(std::filesystem::path& img_path){
QImageReader imageReader(img_path);
if(!imageReader.canRead()){
qDebug()
Подробнее здесь: [url]https://stackoverflow.com/questions/79813106/how-to-convert-stdfilesystempath-to-qstring[/url]
Мобильная версия