[Qt-interest] Comparing icons
Yuvaraj R
yuvaraj at ongobiz.com
Thu Jul 9 17:27:13 CEST 2009
it is giving errors...
Any idea
Thanks
Yuvaraj r
On 7/9/09, Donal O'Connor <donaloconnor at gmail.com> wrote:
> Haven't tried but maybe this since from what I can see QImage can do
> comparisons:
>
> if (icon.pixmap(icon.actualSize()).toImage() ==
> icon1.pixmap(icon1.actualSize()).toImage())
>
> On Thu, Jul 9, 2009 at 12:51 PM, Yuvaraj R <yuvaraj at ongobiz.com> wrote:
>
>> Hi all
>>
>>
>> How do we compare the two icons.
>>
>> I have tried with
>>
>> QIcon icon = QIcon(ui->treeWidget->topLevelItem(0)->child(i)->icon(0));
>>
>> QIcon icon1 = QIcon("/Icons/offline.png");
>>
>> if(icon == icon1)
>>
>> {
>>
>> QMessageBox::information(0,"",QString("same"));
>>
>> }
>>
>>
>>
>> But it is giving errors..
>>
>>
>>
>> Any suggestions ..
>>
>>
>>
>>
>>
>> Advance thanks
>>
>>
>>
>>
>>
>> Yuvaraj R
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
More information about the Qt-interest-old
mailing list