01-30-2013 04:06 AM
I have an actionItem with a image, set as:
ActionItem* aItem1 = ActionItem::create().title(tr("Search")); aItem1->setImage(Image("asset:///images/iconobusca
Where the PNG is and image size 57x57 with the padding recomended, so the total size is 87x87. The image is a white image with transparent background. I have also tryed with a JPG, but it doesn't work either
The problem is that the image is not shown. Just a black space is shown. Any idea?
01-30-2013 04:14 AM
Most likely it's unable to find the image.
The following code works for me:
copyAction_ = ActionItem::create() .imageSource(QUrl("asset:///images/iconsbb/ic_copy
.png")) .title("Copy"); addAction(copyAction_, ActionBarPlacement::OnBar);
In bar-descriptor.xml I have:
The image path is assets/images/iconsbb/ic_copy.png