Skip to content

Commit

Permalink
Update ShowConsole example for 9ab612f
Browse files Browse the repository at this point in the history
  • Loading branch information
j2doll committed Jan 4, 2023
1 parent 9ab612f commit 52e8345
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ShowConsole/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -93,10 +93,16 @@ int main(int argc, char *argv[])
int row = cl.row - 1;
int col = cl.col - 1;

QSharedPointer<Cell> ptrCell = cl.cell; // cell pointer
// https://github.com/QtExcel/QXlsx/commit/9ab612ff5c9defc35333799c55b01be31aa66fc2
// {{
// QSharedPointer<Cell> ptrCell = cl.cell; // cell pointer
std::shared_ptr<Cell> 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;
Expand Down

0 comments on commit 52e8345

Please sign in to comment.