View Full Version : Problem with list View
yuvaraj.yadav
28th April 2009, 13:42
Hi
I am facing problem with list view.....
i added the one cloumn in my listview
My code is
QListView *view;
view->addColumn("names");
But i am gettin error like :: error: 'class QListView' has no member named 'addColumn'
please suggest me to solve this issue
spirit
28th April 2009, 13:47
QListView has not such method, moreover it has not a header.
yuvaraj.yadav
28th April 2009, 14:04
Hi
Thanks for your reply .....
What i did know....
just i dragged the listview and tried to add colums
code
ui->listView->addColums("name");
This one giving problems
Lykurg
28th April 2009, 14:17
Seriously, have you problems reading and understanding English or are you just ignorant? What of the following do you not understand?
QListView has not such method
And by the way, may I ask you how long do you dealing with c++ and documentation reading?
yuvaraj.yadav
29th April 2009, 07:23
Sorry,
For my previous post......
I corrected myself...
I am a beginner.... I have been learning Qt...
My Exact problem is adding the frame to Listview....
Here i followed some code
Tweet *tweet;
ui->setupUi(this);
ui->listView->setIndexWidget(item->index(), tweet );
Here Tweet is my frame .
wysota
29th April 2009, 08:17
I am a beginner.... I have been learning Qt...
Please post in the newbie section of the forum then. You'll get more patience from people there.
My Exact problem is adding the frame to Listview....
Here i followed some code
Tweet *tweet;
ui->setupUi(this);
ui->listView->setIndexWidget(item->index(), tweet );
Here Tweet is my frame .
What does this code have to do with adding columns? Please use QListWidget or better yet QScrollArea instead of QListView if you didn't intend to use a model with it.
Now please click on each link in this post and read the documentation behind them carefully to understand differences between these widgets.
yuvaraj.yadav
29th April 2009, 10:15
Thanks for your reply....
My next thread onwards i will post in nebie forum...
I used QlistWidget....
still struggling with frame issue
To display frame with in list widget is used like this
listWidget->setIndexWidget(currentIndex,new QFrame);
But In output i didn't get the frame ,even i tried with Qlabel also
listWidget->setIndexWidget(currentIndex,new QLabel(tr("yuvaraj"));
It is not diplay the label also
wysota
29th April 2009, 10:30
How many rows does your list widget have? Just please don't guess nor assume but rather check it out by calling the appropriate method from the widget's API.
yuvaraj.yadav
29th April 2009, 12:55
Hi wysota..
Don't mistake me
Really I am struggling with frame issue.....
please suggest me or provide sample code to add frame inside of listview.
for my code to add the frame...
ui->listview ->setIndexWidget(item(0)->index(), tweet)...
I didn't get the frame(tweet) in listview.....
Whats wrong with me
wysota
29th April 2009, 14:02
Whats wrong with me
Well... if you really want to know...
1. You didn't go through any tutorials before taking on a "real programming"
2. You didn't master C++ in a decent way before taking on Qt
3. You didn't answer my question.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.