qt-2.2.0 qlistview - removeColumn method

qt-2.2.0 qlistview - removeColumn method

Post by Jonathan Neit » Thu, 28 Sep 2000 04:00:00



Hi I working on using a qlistview to display at
continuously changing table of values.

Something like this..

Time float data  int data ...
1       0.5        5
2       1.11       89
3       6.3        100
.         .  
.         .

What I want to be able to do is add or remove a column interactively
from
any position (front, middle or the end)

What I have been doing is storing a list of the columns ids in an array
and adjusting the array everytime a column is removed.

Like so..

From the example above I have 3 columns with
ids 0, 1, 2

I then call removeColumn( ) on the list view with the column id.

the array now looks like this if I had removed the 2 column
0,2

This seems to only work when the column being removed is the last
column.
All other valid indexes produce this warning.

        QGArray::at: Absolute index 24 out of range

And cause erratic drawing behaviour in the qlistview widget.

I also tried using the actual index of the column as it was layed out
on the screen which producted the same results.

If anyone knows how to get this to work please let me know.
Thanks in advance.

Jonathan

 
 
 

1. Problem with QListView (Qt widget) & Sorting

Hello:

I need help with an issue I'm having with QListView (a Qt widget).

Specifically, when inserting a series of QListViewItems as children of
some parent QListViewItem, I've noticed that the children show up in the

tree in sorted order (sorted by column 1). I've not told the QListView
widget anything about how to sort its QListViewItems, and in fact I
don't *want* them sorted - I want them displayed in the order that I
create and insert them.

Oddly enough, when I tarred up my source tree and built it on another
RH6.0 Linux box (created using the same install CD as the other box), I
noticed that the children get displayed in the *reverse* order in which
I created them! That I can live with (I can just create them in the
opposite order and everything will be honky-dorey). Also, on the first
machine, clicking on the column headers causes the items to be
re-sorted, while on the second machine it does not.

I'm mystified why I get different behavior between boxes.  It's possible

that I only *think* I'm building from the same source code, and that in
fact there's some small difference which is yielding different behavior
with regard to sorting. I'll allow that possibility. However, what I
really need to know is how I can explicitly control the sorting behavior

of QListView, and how I can enforce the order of inserted
QListViewItems.

Any help would be greatly appreciated.

Thanks

2. Installation Problems

3. Qt QListView problem

4. 128MB I tried what was suggested, but didn't work

5. Qt Question: Problem w/ QListView

6. Web server "freeze" under load : FIXED !

7. Qt-2.2.0-beta2 compile problem

8. how can i increase the number of processes running per user?

9. RH7, QT-2.2.1, and GCC-2.96 = 1 broken KDE 2.0

10. Koffice install problem (qt 1.44 - qt 2.0 problem)

11. QT: a virtual method for a slot

12. Apache with AolPress 2.0 and BROWSE method

13. Qt Designer and Custom Widgets for KDE 2.0