How can i show ios contact image in qt?
General and Desktop
3
Posts
2
Posters
1.7k
Views
2
Watching
-
Hi, I've used qt 5.3 to develop an ios application. I've extracted addressbook details like firstname, lastname, phone numbers and image of each contact by the objective-c codes:
@
NSData contactImageData = nil;
UIImage image = nil;
if(ABPersonHasImageData(person))
{
if(&ABPersonCopyImageDataWithFormat != nil)
{
//ios >= 4.1
contactImageData = (NSData) ABPersonCopyImageDataWithFormat(person,kABPersonImageFormatThumbnail);
}
else
{
//ios < 4.1
contactImageData = (NSData) ABPersonCopyImageData(person);
}
}
else
{
NSLog(@"No Image");
}if(contactImageData != nil) { image = [UIImage imageWithData:contactImageData]; }@
Now my question is how can i convert UIImage (or NSData) to QLabel or QPixmap or QImage to show contact image in qt cpp side?
[edit: added missing coding tags @ SGaist]