首页 > 解决方案 > 如何在 QT Designer 中放置像素图

问题描述

void Editor::DisplayImage(QString(pathOfImage)) 
{
//    QPixmap pix (pathOfImage);
//    ui->lbl_DisplayImage->setPixmap(pix);
//    ui->lbl_DisplayImage->lower();

//    annotationPixmap = QPixmap(pix.size());
//    annotationPixmap.fill(Qt::transparent);

    ui->lbl_DisplayImage->setPixmap(annotationPixmap);
    annotationPixmap = QPixmap(pathOfImage);

    clickMouse = false;
}

我正在尝试移动此像素图并更改像素图图像的大小。我尝试过使用标签,但它们阻止我在图像上绘图,并且图纸总是放在图像后面。有没有办法操纵像素图?

QT 设计器窗口

标签: c++qt

解决方案


推荐阅读