Qt::black and Qt::green are values of enum Qt::GlobalColor. The value of Qt::black is 2 and Qt::green is 8. Comparing these values to the values of image pixels doesn't make sense to me...
Qt::black and Qt::green are values of enum Qt::GlobalColor. The value of Qt::black is 2 and Qt::green is 8. Comparing these values to the values of image pixels doesn't make sense to me...
J-P Nurmi
What is
supposed to do? Remember that Qt::green is not an RGB value but an enum value.Qt Code:
background.setPixel(i*factor+ii, j*factor+jj, Qt::green);To copy to clipboard, switch view to plain text mode
J-P Nurmi
Ok, I have solved the problem, I need to explicitely give the ARGB values, ie 0xff00ff00 for green. I just believed that there was a way to get it as a constant for classic colors, as with Qt::green and so.
It's still an enum value.To get an RGB value you would do something like:
Qt Code:
To copy to clipboard, switch view to plain text mode
J-P Nurmi
Bookmarks