You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, March 20th 2009, 7:51am

get item value in Q3listView

Im using Q3List view but i don't know how to get the item value from it . What i mean ..when i selected the item in Q3ListView , i will click one button and it will pass the value to QLineEdit
It gave me an error. please someone to check this my simple code

void form 1 :: pushButton()
{
Q3ListViewItem *item = ui.listView->currentItem();
ui.lineEdit->setText(item) ; // this line give me an error "no matching funtion for call to QLineEdit::setText
}

2

Wednesday, March 25th 2009, 12:33am

Source code

1
ui.lineEdit->setText(item->text(0));
Mandriva Linux release 2009.0 (Official) for i586
Kernel 2.6.27.10-desktop-1mnb on a Dual-processor i686