[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: error using qlistviewitems
From:       Aaron Seigo <aseigo () kde ! org>
Date:       2004-11-30 23:20:39
Message-ID: 200411301620.43814.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On November 30, 2004 16:10, Grégoire Alexandre wrote:
> Hi guys,
>
> I tried to make a qdialog with a qlistview and of course qlistviewitems,
> but I got a segmentation fault.
>
> When I create a new qlistviewitem and just after calling setText it works
> but if I create an qlistviewitem in the qdialog's constructor and then call
> setText in languageChange() it doesnt work.
>
> the variable is declared in the header file

in the ctor:

// 	listviewitem_connect_options = new QListViewItem( listviewitem_connect, 
listviewitem_connect_servers );

so listviewitem_connect_options is never given a pointer to an object (e.g. 
it's invalid). then in languageChange you do:

    listviewitem_connect_options->setText( 0, tr( "Options" ) );

which will then obviously crash.


-- 
Aaron J. Seigo
Society is Geometric

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic