[PATCH] qcombobox bug workaround
faure at kde.org
Wed Apr 1 11:03:59 BST 2009
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.
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel