View Single Post
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#5
Originally Posted by Rob1n View Post
Looking at that again now - you appear to be creating the QStandarditemModel as a local variable (i.e. on the stack), so it will be destroyed when it goes out of context. I had a similar issue using PyQt. Have you tried creating it on the heap instead (i.e. QStandardItem *model = new QStandardItemModel(10,2))?
Alright I just tried that and it worked .. I'm surprised why I didn't see such a silly error before :P

Anyways, I have another question .. Although images are beings displayed as icons now, they are *very* small !! I actually would like the entire index to be filled with the image itself, instead of just having a much smaller version of the image as an icon next to some text .. Here is what its looking like now:



I want that tiny rectangular icon to fill up the entire entry (which is rectangular too) ..

Can this be done ?