Search code examples
c++linuxqtxlsx

cannot use Qt Xlsx


I have Qt 5.15 Beta-2 in /opt. I've also downloaded from here and built the Qt5::Xlsx module [qmake, sudo make, sudo make install]. Now in /opt/Qt/5.15.0/gcc_64/include there's a directory QtXlsx but it contains only one file QtXlsxDepends. No xlsxdocument.h, xlsxcell.h or anything like that, so Qt Creator says file not found if I try to include them as in here.

the output of the build commands


Solution

  • The sought-for headers are in /opt/Qt/5.15.0/gcc_64/mkspecs/features/include/QtXlsx. So I added target_include_directories(target PRIVATE /opt/Qt/5.15.0/gcc_64/mkspecs/features/include/QtXlsx) to my CMakeLists.txt and the problem went away.