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

List:       kjsembed
Subject:    [kjsembed] QListView confusion
From:       Håvard Dahle <havardda-dev () orakel ! ntnu ! no>
Date:       2004-12-06 12:05:59
Message-ID: 20041206120559.GA25824 () orakel ! ntnu ! no
[Download RAW message or body]

This is my first post, so let me start off by saying hi: HI LIST!

Right. I have little experience with the QT api, and I've run into some
problems with QListView that for the life of me I cannot solve on my
own. Thus this message.

I have a QListView (mode == "extended") made with QT Designer, and
loaded with Factory.loadui(). It is populated with items from a
database, using QListView.insertItem() as in the example qlistview.js.
This is all working fine. 

However, I want to retrieve the selected row(s) later on. And I really
can't figure out how to do that. I was hoping selectedIndex would tell
me something, but it doesn't.. And also, I don't understand how to
iterate the list. The c++ docs mention firstChild() and nextSibling()
but neither are implemented(?)

Here are my observations:

 - QListView.child(i) doesn't behave like QGroupBox.child(i)
 - typeof(QListView.childCount) == "number", whereas
   typeof(QGroupBox.childCount) == "function"
 - typeof(QListView.firstChild) == "undefined"

Are these bugs, or am I totally off? Can someone please guide me in the
right direction?

Thanks a bunch,
-- 
Håvard Dahle
orakel.ntnu.no/~havardda
_______________________________________________
kjsembed mailing list
kjsembed@kde.org
https://mail.kde.org/mailman/listinfo/kjsembed

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

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