QPixmap Crash - "...terminate it in an unusual way" (QT4.4)
I have done the following:
Created a new empty QT project.
Added a source file.
Code:
#include <QPixmap>
int main(int argC,char** argV)
{
}
This results in:
Quote:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I am hoping someone can help me figure out how to resolve this issue. I have had it on a much larger scale and been able to work out that the error occurs with even the smallest of scales, as seen above. What would cause such a crash when using QPixmap?
Re: QPixmap Crash - "...terminate it in an unusual way" (QT4.4)
Hi,
you can use a QPixmap only inside the GUI thread thus you have to initialize QApplication first. Or use QImage instead, which don't need a GUI thread.
Re: QPixmap Crash - "...terminate it in an unusual way" (QT4.4)
Re: QPixmap Crash - "...terminate it in an unusual way" (QT4.4)
Once you have a QApplication instance you need to either double the backslash in the path to your file, i.e. "D:\\new.png", or use forward slashes and let Qt work it out for you.