qpixmap

    11熱度

    2回答

    既然QPixmap :: toWinHBITMAP()已被棄用,我無法找到從QPixmap(或QImage)獲取HBITMAP的方法。我發現有一個叫做qt_pixmapToWinHBITMAP()的函數,它似乎會做我所需要的,但我找不到應該啓用的模塊 - 如果在我的.pro文件中有任何 - 或者我應該包含什麼頭文件使用它,或者其他的東西。 我需要一個HBITMAP的原因是使用VFW創建一個視頻。當

    0熱度

    1回答

    我從加載以前從大型遊戲文件加載的原始bmp數據中加載圖像數據時出現了一些問題。 我確定數據正常,因爲未到達else分支,但圖像未顯示。 也許我沒有正確使用loadFromData? 之前有人遇到過這個問題嗎? QByteArray buff((this->current_object->image_buffer)); QPixmap pixmap; if(pixmap.loadFromData

    1熱度

    1回答

    我正在通過使用QPixmap和QPainter編寫簡單的應用程序。在我的程序中,我需要加載一些圖像並調整它們的大小。我使用QPixmap :: scaled(),但圖像不縮放。我做錯了什麼? 這是我的代碼: chesstile.cpp #include "chesstile.h" ChessTile::ChessTile(QWidget *parent) : QLabel(paren

    0熱度

    1回答

    我創建QPropertyAnimation並將其連接到我的SonogramWidget,這些動畫事件垂直滾動長圖片。 「長圖片」由100個預先計算的QPixmap對象1024x128垂直放置。他們顯示在SonogramWidget::paintEvent()與QPainter。繪製過程不一定全部爲QPixmap,但只能看到它們,考慮小部件高度和當前垂直偏移量。 CPU幾乎是免費的,因爲QPixma

    0熱度

    1回答

    我可以畫一個QPixmap就好: QPainter painter; painter.drawPixmap(x, y, w, h, my_pixmap); 而且我也可以畫一個圓圈: painter.drawArc(x, y, w, h, a, alen); 現在,我想這兩個結合起來;我的像素圖可能並不總是一個圓圈(=透明的角落),所以我不能只在屏幕上繪製整個像素圖。 這意味着我只需要繪製

    1熱度

    1回答

    我試圖用QPixmap在QLabel上顯示圖片,但圖片不顯示。有人能幫助我嗎? onglets = new QTabWidget(this); //création des onglets page1 = new QWidget; //création de la page 1 page2 = new QLabel; //création de la page 2 page1->setLa

    6熱度

    1回答

    在我的項目我有改變像素映射經常像這樣的QLabel: ui->frameLabel->setPixmap(slot_pic[blockId[currentSlot]][damageId[currentSlot]]); slot_pic是一個簡單的2D地圖。所以你可以看看它更清楚這樣的: ui->frameLabel->setPixmap(pixmap); 圖像是16x16的大小和我的標籤是

    1熱度

    1回答

    巴紐/ .JPG文件這是我到目前爲止有: QFile file(fileName); file.open(QIODevice::WriteOnly); QPixmap pixmap = QPixmap.loadFromData((const uchar *) imageBuffer_pointer, (sizeof(imageRows) * sizeof(imageCols)); pixma

    8熱度

    2回答

    我是Qt/Embedded的新手。我想用QPainter在QPixmap上畫東西,這會被添加到QGraphicsScene。這是我的代碼。但它不會在像素圖上顯示圖紙。它只顯示黑色像素圖。 int main(int argc, char **argv) { QApplication a(argc, argv); QMainWindow *win1 = new QMainWin

    2熱度

    1回答

    有沒有辦法調整QPixmap的畫布大小,類似於image editor does it - 通過填充和裁剪圖像(如有必要),但不縮放? 如果不是,我假設我應該創建一個新的(兼容的)QPixmap,並使用QPainter::drawPixmap()來正確放置原始圖像。