Qt Snippet: Create QPixmap with transparent background

If you want to create a QPixamp object with transparent background you simply need to fill the entire area with transparent color immediately after created. After doing this you can start to draw over.



QPixmap MyPixmap(QSize(32,32));

MyPixmap.fill(Qt::transparent);

// Now you can draw into
// .......

If you want to know how to draw into a QPixmap check this post.

Comments

  1. Everyone wants to make their photos the most beautiful. Somebody wants to auto cut his image. Someone wants to change background of their photo or cut out image.
    MasterLogix team make the best tool for change background & background removerchange background in android app.
    Remove Image Background Make Transparent Image best app for background eraser and change background to make your photo more stylish and attractive with this cut out image

    ReplyDelete

Post a Comment

Popular posts from this blog

Android: adb push and read-only file system error

Access GPIO from Linux user space