#include<iostream>
#include <QWidget>
#include<QPainter>
#include<QImage>
#include<QApplication>
#include <QPlastiqueStyle>
using namespace std;
int main(int argc, char *argv[])
{
 QApplication a(argc, argv);
 QApplication::setStyle(new QPlastiqueStyle);
 QImage tmpImg("boy.jpg", "Format_RGB32");
 int widgetWidth;
 int widgetHeight;
 widgetWidth = tmpImg.width();                       //Returns the width of the image
 widgetHeight = tmpImg.height();
 cout<<widgetWidth<<widgetHeight<<endl;
 return a.exec();
}
其实我的意思很简单,就是读进一幅图像,显示它的大小,为什么在编译之后会出现权限受限的问题?
cannot open output file debug\untitled.exe:Permission denied