[Qt-interest] QTreeWidget

Malyushytsky, Alex alex at wai.com
Mon Mar 16 22:18:51 CET 2009


Please remember that to answer your question, people need to understand your problem first.

If I got it right, which I doubt, it will be :
you need to set number of columns visible in your TreeWidget.
To know why, read documentation.

It probably can be done in

TreeWidget::fileNameUpdate(QString filename)
{
   Item->setText(count,filename);
   count++;

   int columns = columnCount ();
   if ( columns < count )
          setColumnCount ( count );
}

Alex
________________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Sujan Dasmahapatra
Sent: Monday, March 16, 2009 6:51 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] QTreeWidget

Dear Friends
I got treeWidget class  for updating my geometries when it's loaded. I am doing something like this

In the class
 Class TreeWidget : public QTreeWidget
{
                Q_OBJECT
private:
       int  count;
       QTreeWidgetItem *item;
public:
                TreeWidget()
public:
                Void fileNameUpdate(Qstring filename);
};


TreeWidget::TreeWidget()
{
       count = 0;
       item = new QTreeWidgetItem(this);
}

TreeWidget::fileNameUpdate(QString filename)
{
                Item->setText(count,filename);
                count++;
}



But my file name is  coming only for the first time the geometry is loaded.......it's not appending one by one.
Can anyone tell me whats wrong this and what should I do ???




Kind regards,
LM Glasfiber R&D (India) Pvt. Ltd.

Sujan Dasmahapatra
Project Engineer - CFD

Telephone: +91 80 66470248
Mobile:
E-mail: sdh at lmglasfiber.com




--------------------------------------------------------------
This e-mail and any attachments are confidential. If you are not the named or intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any medium. Any unauthorized disclosure, use or storage is prohibited and might be unlawful.


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

"Please consider our environment before printing this email."




More information about the Qt-interest-old mailing list