From 52e834540e179f74e4e9c13da050085ee8a56a62 Mon Sep 17 00:00:00 2001 From: Jay Two Date: Wed, 4 Jan 2023 12:46:10 +0900 Subject: [PATCH] Update ShowConsole example for 9ab612ff5c9defc35333799c55b01be31aa66fc2 --- ShowConsole/main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ShowConsole/main.cpp b/ShowConsole/main.cpp index 815a3367..e9556187 100644 --- a/ShowConsole/main.cpp +++ b/ShowConsole/main.cpp @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) if ( argc != 2 ) { - std::cout << "[Usage] ShowConsole *.xlsx"; + std::cout << "[Usage] ShowConsole *.xlsx" << std::endl; return 0; } @@ -93,10 +93,16 @@ int main(int argc, char *argv[]) int row = cl.row - 1; int col = cl.col - 1; - QSharedPointer ptrCell = cl.cell; // cell pointer + // https://github.com/QtExcel/QXlsx/commit/9ab612ff5c9defc35333799c55b01be31aa66fc2 + // {{ + // QSharedPointer ptrCell = cl.cell; // cell pointer + std::shared_ptr ptrCell = cl.cell; // cell pointer // value of cell - QVariant var = cl.cell.data()->value(); + // QVariant var = cl.cell.data()->value(); + QVariant var = ptrCell->value(); + // }} + QString str = var.toString(); cellValues[row][col] = str;