QTableView issues

Vladimir Prus ghost at cs.msu.su
Sat Dec 15 18:50:23 UTC 2007


Looking at current breakpoint windget, I see that the table
header does not use 100% of width -- in fact, the columns are
so narrow that captions itself are not readable. Furthermore,
the first column "Enable/Disable" is edited using combobox
with "True" and "False" as values, and unless I double click
it, no value is shown at all.

1. I want the "Enable" column to be combobox. I've tried
to make the data method of the model return Qt::Unchecked/Qt::Checked,
which almost worked. Now, the cell has a checkbox, but Qt 
draws an empty area with dotted border right to checkbox. How do
I tell Qt there's nothing but checkbox?

2. I want most of columns to be wide enough to either
display the header, or N characters. How do I compute this
number, taking into account any padding QItemDelete would put?

3. I want one column ('Location') to take all extra available width,
but still allow to resize other columns. While QHeaderView::Stretch
allows me to make the column wide enough, it makes subsequence
columns not resizeable (actually they are resizeable but only if I drag
the separator to the *right* of the column -- which looks more like
a bug than a desired behaviour).

Anybody has any ideas?

- Volodya






More information about the KDevelop-devel mailing list