moved some duplicate code from table/tree into item
can now get the level from a qtindex
fixed use_assert