cout and cin redirect in qtextEdit
-
i have this code
#include <iostream>int main() {
char a[20];
std::cin>>a;
std::cout << a;return 0;}
i want take input and out from textedit box -
i have this code
#include <iostream>int main() {
char a[20];
std::cin>>a;
std::cout << a;return 0;}
i want take input and out from textedit box@VIKASKUMAR Can you explain why you want to put input from std::cin into a QTextEdit. You should describe your use case better.
Putting text into QTextEdit is simple: https://doc.qt.io/qt-6/qtextedit.html#append or https://doc.qt.io/qt-6/qtextedit.html#setTextAnd please don't double post! Your other post is same, right? https://forum.qt.io/topic/142990/input-and-output-are-displayed-in-the-terminals-by-my-c-code-they-should-be-shown-in-qt-textedit-please?_=1676529236213