Re: How to use C++ includes?
Re: How to use C++ includes?
Ok, found that I have to enter the include in "Includes (in Implementation)" of Qt Designer, now I can compile. But I don't see an output...
I expect to see some output after I click on file open, I have implemented:
void Form1::fileOpen()
{
cout << "my output";
}
Since it uses the standard signals/slots created by default I can't see where the error is.
Re: How to use C++ includes?
Flush the output buffer:
Code:
#include <iostream>
void Form1::fileOpen(){
std::cout << "my output" << std::endl;
}
And remember that you have to run the application from a terminal.
BTW. It might be easier to use qDebug() instead of those cout statements.
Re: How to use C++ includes?
That works perfectly! Thanks as well for the hint with qdebug. Will have a look into this as well.
Regards,
Jochen