Display COUT in (visual studio/Qt framework)
-
hi my freinds :)
I'm using VStudio and Qt framework for image processing ...
when i run every thing is fine, but the COUT is not workingcout << "Extracted " << contours.size() << " contours" << endl;
thank you
-
Hi
In what way not working ?
std::cout is normally displayed in Application Output pane. -
it works when i changed to project properties :
project properties -> linker -> system -> subsystem : console(/subsysteme:console)
[before it was : -> subsystem : windows(/subsysteme:windows) ]
-
it works when i changed to project properties :
project properties -> linker -> system -> subsystem : console(/subsysteme:console)
[before it was : -> subsystem : windows(/subsysteme:windows) ]
@Amine-Djeddi
Well std::cout is not visible in GUI projects.
Only when its a console app.
So that is pretty normal. -
yup :))
thank you for being here to help -
yup :))
thank you for being here to help@Amine-Djeddi
See e.g. https://stackoverflow.com/questions/16703835/visual-studio-how-can-i-see-cout-output-in-a-non-console-application if you'd still like a way to see your output when a GUI program.... -
yup :))
thank you for being here to help@Amine-Djeddi
Hi,
What are you trying to use it for ?
If you want the GUI program to also have a "command prompt" showing
you will need to create on using native windows calls.
If you just want to use std::cout for some debugging, the easy way is to redirect them to
a file and load in PlainTextEdit in the app. -
@mrjj
Hi again , i used this and it worsks fine :)
outData.open("count.csv", ios::app);outData << ui.lineEdit_Filename->text().toStdString() << ";Number of Objects: " ;
outData << contours.size() <<endl;than i will work for "PlainTextEdit" .. if i get into troubles XD than i will ask for help