I wanted to dump some QStrings to the console. I am using the following code:
std::cout<<"#"<<Item_Parent->child(i)->data(DB_SERIES__PATH,Qt::DisplayRole).toString().constData()<<"\n";
std::cout<<"#"<<Item_Parent->child(i)->data(DB_SERIES__PATH,Qt::DisplayRole).toString().constData()<<"\n";
To copy to clipboard, switch view to plain text mode
It seems fine but I get the following at the console:
#0x815b8aa
#0x816ee42
#0x8175eb2
#0x815b8aa
#0x816ee42
#0x8175eb2
To copy to clipboard, switch view to plain text mode
I want to see the string. I thought constData() would work, but it seems like cout is not processing it right. Suggestions?
Bookmarks