PDA

View Full Version : :) Refinement of 'SelectColumns' Behavior



jkrienert
23rd December 2014, 15:46
Hello world.

Holding curiosity on PyQt QtableView guidelines. Is possible with (relatively simple) code, to:
-allow a user to select a one or many item range bound in absolute by a single column?

A combination of '...setSelectionBehavior(QtGui.QAbstractItemView.S electColumns)' and '....setSelectionMode(QtGui.QAbstractItemView.Exte ndedSelection)' have been trialed to no solution.

Ideally,
-rather then an entire column (as SelectColumns causes), I would like to retrieve a variable range within ONE column.
[please see ref. image below]

Possible wisdom or examples on this 'ish?
Thanks and Happy Holidays!

10833

anda_skoa
29th December 2014, 19:11
I guess you would need ExtendedSelection and SelectItems and implement the "confine to column" yourself.

Cheers,
_