[Qt-interest] Issue in appending QList Variable

Kamakshi Sivaraman Kamakshi.Sivaraman at lntinfotech.com
Tue May 5 13:29:38 CEST 2009


Hi,

Is it not possible to use userdefined structure as value in QList ?
For Eg:
struct stlistData{ 
                QString strName; 
                }; 

                stlistData obj; 
                obj.strName = "XYZ"; 
                QList<stlistData> liststr; 
                liststr.append(obj); 


Thanks & Regards,
S.KAMAKSHI
Larsen & Toubro Infotech Limited
Whitefield,
Bangalore -560066

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as: 

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech 
Internal Use Only   L&T Infotech General Business 

This Email may contain confidential or privileged information for the 
intended recipient (s) If you are not the intended recipient, please do 
not use or disseminate the information, notify the sender and delete it 
from your system. 



chandrasekar wagmare <sekarwagmare at gmail.com> 
05/05/2009 04:56 PM

To
Kamakshi Sivaraman <Kamakshi.Sivaraman at lntinfotech.com>
cc

Subject
Re: [Qt-interest] Issue in appending QList Variable






usually QList is defined as
 QList<QGraphicsItem *> x86List;
QList <QWidget *> list





On Tue, May 5, 2009 at 4:47 PM, Kamakshi Sivaraman <
Kamakshi.Sivaraman at lntinfotech.com> wrote:

Hi, 

I am using QList<SomeStructure> as a value inside my QMap. I m unable to 
fill the list with the structure elements. Always the list points to a Bad 
Ptr. 

One such example I have tried is: 
struct stlistData{ 
                QString strName; 
                }; 

                stlistData obj; 
                obj.strName = "XYZ"; 
                QList<stlistData> liststr; 
                liststr.append(obj); 

The QList variable after appending still shows error. Please let me know 
if I have coded correctly. 


Thanks & Regards,
S.KAMAKSHI
Larsen & Toubro Infotech Limited
Whitefield,
Bangalore -560066

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as: 

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech 
Internal Use Only   L&T Infotech General Business   

This Email may contain confidential or privileged information for the 
intended recipient (s) If you are not the intended recipient, please do 
not use or disseminate the information, notify the sender and delete it 
from your system. 
______________________________________________________________________

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




-- 
WAGMARE

______________________________________________________________________


______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090505/8aef7fa4/attachment.html 


More information about the Qt-interest-old mailing list