[Qt-interest] Comparing icons
Donal O'Connor
donaloconnor at gmail.com
Thu Jul 9 17:06:29 CEST 2009
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090709/a8d22c9c/attachment.html
More information about the Qt-interest-old
mailing list