[Qt-interest] Set a constraint on QComboBox [Make every item unique]
Paul Miller
paul at fxtech.com
Sat Mar 13 15:32:40 CET 2010
On 3/13/2010 1:50 AM, Aaron Lewis wrote:
> Hi,
> How can i make a QComboBox has no same entries ? I mean to set an
> restrict.
>
> If there's no such functions , i'd have to create one myself. (Before
> inserting into it , check the constraint)
>
> Will appreciate your help ;-)
One thing you could try is make a subclass and override showPopup() -
then before calling QComboBox::showPopup(), scan the list and remove
duplicates.
More information about the Qt-interest-old
mailing list