[PySide] self.SelectionMode() return

Tim Roberts timr at probo.com
Wed Aug 17 18:17:02 CEST 2016


oislone wrote:
>
> write code :
> -----------------------------------------
> self.setSelectionMode(QAbstractItemView.MultiSelection)
> print(self.SelectionMode())
> --------------------------------------------
> return PySide.QtGui.QAbstractItemView.SelectionMode.NoSelection
>
> but i cau use self.selectAll() self.clearSelection()why ? 

The SelectionMode controls the user interface.  That is, it determines
what kind of selection the user is able to do from the keyboard and
mouse.  It's not trying to protect you from yourself.  If you don't want
to select items, then don't call selectAll or clearSelection.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160817/77a75b75/attachment.html>


More information about the PySide mailing list