File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,5 @@ start ./ConsoleApplication.sln
1717```
1818
1919#### References
20- > https://github.com/ArthurSonzogni/cmake-Qt5-example
20+ > https://github.com/ArthurSonzogni/cmake-Qt5-example < br >
2121> https://github.com/miurahr/cmake-qt-packaging-example
Original file line number Diff line number Diff line change 1+ /* ****************************************************************/ /* *
2+ * \file main.cpp
3+ * \brief Qt console application with CMake example
4+ *
5+ * \author Xuhua Huang
6+ * \date January 31, 2021
7+ *********************************************************************/
8+
19#include < iostream>
210
311#include < QTextStream>
@@ -24,6 +32,7 @@ int main(void)
2432 std::getline (std::cin, tempName); // use getline() function with std::istream
2533
2634 // convert std::string to QString and print to console
35+ // with static factory function fromStdString
2736 QString Name = QString::fromStdString (tempName); // convert
2837 out << " Hello " << Name << " !" << " \n " ; // print
2938 out.flush ();
You can’t perform that action at this time.
0 commit comments