Discussion:
[Wt-interest] WComboBox question
Mario Diethelm Guallar
2015-06-16 15:07:28 UTC
Permalink
Hi,

I am using some WComboBox objects based on WSortFilterProxyModel as
underlying data model. With the WComboBox objects based on
WStandardItemModel you can use setCurrentIndex(-1) to clear the current
selection, but with the WComboBox objects based on
WSortFilterProxyModel, even after resetting the filter
(setFilterRegExp(".*")) the setCurrentIndex(-1) call sets the WComboBox
object to the first element (index 0) instead of clear the current
selection.

Is this the expected behavior? Is there a mechanism to clear the
selection for a WComboBox based on a WSortFilterProxyModel?

thanks.

________________
Mario Diethelm
Koen Deforche
2015-06-23 16:28:23 UTC
Permalink
Hey,
Post by Mario Diethelm Guallar
I am using some WComboBox objects based on WSortFilterProxyModel as
underlying data model. With the WComboBox objects based on
WStandardItemModel you can use setCurrentIndex(-1) to clear the current
selection, but with the WComboBox objects based on WSortFilterProxyModel,
even after resetting the filter (setFilterRegExp(".*")) the
setCurrentIndex(-1) call sets the WComboBox object to the first element
(index 0) instead of clear the current selection.
Post by Mario Diethelm Guallar
Is this the expected behavior? Is there a mechanism to clear the
selection for a WComboBox based on a WSortFilterProxyModel?

I suspect this is a bug. The ability to support "no selection" is a recent
change.

Can you file this as a bug on redmine?

Koen
Mario Diethelm Guallar
2015-06-23 16:54:37 UTC
Permalink
Thank you Koen.Issue #4233 created.

Regards.
________________
Mario Diethelm



------ Original Message ------
From: "Koen Deforche" <***@emweb.be>
To: ***@gmail.com; witty-***@lists.sourceforge.net
Sent: 23-06-2015 13:28:23
Subject: Re: [Wt-interest] WComboBox question
Post by Mario Diethelm Guallar
Hey,
Post by Mario Diethelm Guallar
I am using some WComboBox objects based on WSortFilterProxyModel as
underlying data model. With the WComboBox objects based on
WStandardItemModel you can use setCurrentIndex(-1) to clear the current
selection, but with the WComboBox objects based on
WSortFilterProxyModel, even after resetting the filter
(setFilterRegExp(".*")) the setCurrentIndex(-1) call sets the WComboBox
object to the first element (index 0) instead of clear the current
selection.
Post by Mario Diethelm Guallar
Is this the expected behavior? Is there a mechanism to clear the
selection for a WComboBox based on a WSortFilterProxyModel?
I suspect this is a bug. The ability to support "no selection" is a
recent change.
Can you file this as a bug on redmine?
Koen
Loading...