[Qt-interest] childCount()
Sujan Dasmahapatra
sujan.dasmahapatra at gmail.com
Fri Jul 31 10:58:42 CEST 2009
> //*Sample* It should be item only.
> QTreeWidget *treeWidget = new QTreeWidget;
> QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget);
> QTreeWidgetItem *child = new QTreeWidgetItem(item);
> child->setText("I am a child");
> *item->addChild(child);*
On Fri, Jul 31, 2009 at 2:24 PM, Ender EREL <erelender at yahoo.com> wrote:
> Sujan Dasmahapatra wrote:
> > Dear Friends
> >
> > After I added a child TreeWidgetItem into an existing TreeWidgetItem but
> > the value of childCount() is not updated. What could be the reason can
> > anyone tell me ?
> >
> > *Sample*
> > *QTreeWidget *treeWidget = new QTreeWidget;*
> > *QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget);*
> > *QTreeWidgetItem *child = new QTreeWidgetItem(item);*
> > *child->setText("I am a child");*
> > *item1->addChild(child);*
>
> Is this a typo? You are adding the child to item1 and calling childCount
> of item.
>
> --
> Ender EREL
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Thanks & Regards
S. Dasmahapatra
B.E. (Aeronautics-Aerodynamics)
Senior Engineer---CFD(Computational Fluid Dynamics)
L M Glasfiber R & D (India) Pvt Ltd
Bangalore, India
Ph:91-9900839788
Office:91-80-66470248
mail id : sujan.dasmahapatra at gmail.com
sdh at lmglasfiber.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090731/b502cbb5/attachment.html
More information about the Qt-interest-old
mailing list