Input for QT console application

I simply would like to get input from the user for a QT console application via the command line.

I have tried getline to store the input as a QString but keep getting errors

1
2
3
4
   QString productName;
std::cout << "Enter Product Name: " ;
    std::getline(std::cin, productName);


I know this is probably very wrong, but can someone kindly guide me in the right direction
Topic archived. No new replies allowed.