Edwin Leuven wrote:
Abdelrazak Younes wrote:
+    // But Qt doc just say use bits...
+    unsigned int * const data = (unsigned int *)img.bits();

kde has this instead:

unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
          (unsigned int *)img.colorTable();


but it turns out i get:

../../../../lyx-devel/src/frontends/qt4/QLImage.C:187: error: invalid cast from type 'QVector<unsigned int>' to type 'unsigned int*


which makes me wonder why it works for kde...

is the following a good solution?

unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
          (unsigned int *)img.colorTable().begin();

Reply via email to