|
QString s = QFileDialog::getOpenFileName(
"/home",
"Images (*.png *.xpm *.jpg)",
this,
"open file dialog"
"Choose a file" );
QPixmap *pixmap1=new QPixmap(s);
pixmapLabel1->setPixmap(pixmap1); <-这就是48行
先打开一个对话框将选中的文件名->s,然后建一个qpixmap对象,最后改变label的pixmap,可是编绎有错误,不明白是什么意思
/home/huting/program/myfirst/src/myfirst.cpp:48: error: no matching function for call to `QLabel::setPixmap(QPixmap*&)'
*/usr/lib/qt-3.3/include/qlabel.h:104: error: candidates are: virtual void QLabel::setPixmap(const QPixmap&) |
|