Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with QPixmap
Forum Updated to NodeBB v4.3 + New Features

Problem with QPixmap

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 704 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nanouk
    wrote on last edited by
    #1

    Hello everyone, my name is Nanouk and I am trying to developp a game

    for the lobby of the game I need to make a mask in a specific color on an image, I tried everything possible and came out with this :

    QPixmap pix("images/radioButtonEmpty.png");
    pix.createMaskFromColor(QColor(50,200,50),Qt::MaskInColor);
    ui->label->setPixmap(pix);

    but the specific color isn't transparent at all.

    Also I have a problem with my pixmaps, the ones I define with the UI Form only show when I compile and execute in QT Creator and the ones I define as Code doesn't show. But when I go in the file and launch the .exe , it's the EXACT opposite, labels of the ui don't show and the ones define by code are displayed.

    I would really like you guys to help me, since im new to this forum.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      The colour may also be set with a alpha setting if I'm not mistaken.
      The second problem is almost unanswerable. Without code we can only guess to where a mistake was made.
      greetz

      Greetz, Jeroen

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved