Qt在Label上显示图片
2014-06-06 21:38
225 查看
/构造函数中声明QLabel QPainter QImage
QLabel *label->setGeometry(16,22,320,240);
QPainter *painter = new QPainter(label);
QImage *image = new QImage(image,320,240,QImage::Format_RGB888);
<
4000
li class="alt" style="margin:0px;padding:0px 0px 0px 10px;border-width:0px 0px 0px 1px;border-left-style:solid;border-left-color:rgb(209,215,220);text-align:left;list-style:disc;line-height:18px;color:rgb(102,102,102);">
//显示时调用
image->load(“./img3.jpg”);//显示图片文件
label->setPixmap(QPixmap::fromImage(*image,Qt::AutoColor));
QLabel *label->setGeometry(16,22,320,240);
QPainter *painter = new QPainter(label);
QImage *image = new QImage(image,320,240,QImage::Format_RGB888);
<
4000
li class="alt" style="margin:0px;padding:0px 0px 0px 10px;border-width:0px 0px 0px 1px;border-left-style:solid;border-left-color:rgb(209,215,220);text-align:left;list-style:disc;line-height:18px;color:rgb(102,102,102);">
//显示时调用
image->load(“./img3.jpg”);//显示图片文件
label->setPixmap(QPixmap::fromImage(*image,Qt::AutoColor));
相关文章推荐
- QT:缩放图片使之合适显示在指定的label内
- Qt---Label显示图片,自动设置大小
- Qt中通过控件在Label标签中显示一张静态图片
- Qt添加窗口背景图片、Label图片显示、、Label文字显示
- QT中label显示图片
- QT 下载图片后label不显示.png的问题
- QT中使用opencv加载图片使用label显示
- Qt:添加点击事件的Label并显示图片
- Qt中插入图片并在label中显示
- QT GUI界面的使用 opencv选择并显示图片于label中
- Qt label 显示gif 图片
- OpenCV【2】---读取png图片显示到QT label上的问题
- Qt label显示图片
- QT 使用label和commandlinkbutton循环显示图片
- QT显示图片
- QT 显示图片
- QT完成图片拖拽显示【本文转载自网络】
- Qt 中如何实现对图片设置透明色显示
- QT 显示图片
- ubuntu11.04下QT4.7+OpenCV2.2开发环境搭建成功,成功打开并显示图片