[Qt-interest] Comparing icons

Donal O'Connor donaloconnor at gmail.com
Thu Jul 9 17:30:52 CEST 2009


What are the errors?

On Thu, Jul 9, 2009 at 4:27 PM, Yuvaraj R <yuvaraj at ongobiz.com> wrote:

> 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
> >>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090709/80cacd5f/attachment.html 


More information about the Qt-interest-old mailing list