We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I build the QXlsx library using CMakeLists.txt with Qt Creator, the following code snippet in xlsxworkbook.cpp triggers a compilation error:
xlsxworkbook.cpp
AbstractSheet *sheet = addSheet(name, sheetId, type); sheet->setSheetState(state); if (relationship.target.startsWith("/")) { QString fullPath = QDir::cleanPath(relationship.target.mid(1)); sheet->setFilePath(fullPath); }
The error message is as follows:
D:\cad\QXlsx\QXlsx\source\xlsxworkbook.cpp:610: error: C2248: "QString::QString": cannot access private member declared in class "QString" D:\Qt\6.8.1\msvc2022_64\include\QtCore/qstring.h(1014): note: see declaration of "QString::QString" D:\Qt\6.8.1\msvc2022_64\include\QtGui/qwindowdefs.h(43): note: see declaration of "QString"
However, when I use the QXlsx.pro file to open and build the same project in Qt Creator, it compiles successfully without any issues.
If I comment out the following compile definitions in CMakeLists.txt:
CMakeLists.txt
QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
The project compiles successfully even when using CMakeLists.txt.
I want to understand why this error occurs when these definitions are enabled.
I am concerned whether removing QT_NO_CAST_TO_ASCII and QT_NO_CAST_FROM_ASCII will have any negative impact on the code or library behavior.
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_ASCII
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment:
Problem:
When I build the QXlsx library using CMakeLists.txt with Qt Creator, the following code snippet in
xlsxworkbook.cpp
triggers a compilation error:The error message is as follows:
However, when I use the QXlsx.pro file to open and build the same project in Qt Creator, it compiles successfully without any issues.
Observations:
If I comment out the following compile definitions in
CMakeLists.txt
:The project compiles successfully even when using
CMakeLists.txt
.I want to understand why this error occurs when these definitions are enabled.
I am concerned whether removing
QT_NO_CAST_TO_ASCII
andQT_NO_CAST_FROM_ASCII
will have any negative impact on the code or library behavior.Questions:
CMakeLists.txt
?Steps to Reproduce:
CMakeLists.txt
.xlsxworkbook.cpp
line 610.QT_NO_CAST_TO_ASCII
andQT_NO_CAST_FROM_ASCII
inCMakeLists.txt
.The text was updated successfully, but these errors were encountered: