[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] qcombobox bug workaround
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2009-04-01 10:20:04
Message-ID: 20090401102004.GB18303 () neo ! apaku ! dnsalias ! org
[Download RAW message or body]
On 01.04.09 13:08:37, Nick Shaforostoff wrote:
> On Wednesday 01 of April 2009 13:03:59 you wrote:
> > On Saturday 28 March 2009, Nick Shaforostoff wrote:
> > > Attached are patch and testcase (.cpp and .pro) for the bug.
> >
> > This is not really a bug, in my opinion.
> >
> > The view() of a combobox is the popup that shows up when opening the combo.
> > If you don't open the combo at all, then obviously the view isn't used, so why
> > should its currentIndex() matter? If you want to know the current item in the combo
> > itself, that's what combo->currentIndex() does. I see little reason to call
> > combo->view()->currentIndex().row() instead, since this indeed relies on the popup
> > being used, which might not be the case.
> its for combo->view()->currentIndex().data(Qt::UserRole)
Scratch that other email, I forgot that combo->currentIndex() only gives
you an int and not a model index. However itemData() should do exactly what
you want, give it the current combobox index and retrieve the data from the
underlying model.
Andreas
--
You will be awarded some great honor.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic