Hello, try something like:

self.comboBox.currentIndexChanged.connect(self.onCurrentIndexChanged)


> def onCurrentIndexChanged(self, newIndex):

    self.comboBox.adjustSize() # Don't know if this works automagically, but
> given the newIndex argument,

                                                you could fetch the current
> selected string and calculate the required width yourself in the worst case



On Thu, May 27, 2010 at 12:01 PM, aaron barclay <aaron.diplo...@gmail.com>wrote:

> Hello,
>
> I am having trouble setting a QComboBox. I would like the ComboBox to be
> quite narrow, that is easy enough, but when clicked on I would like the
> combobox to expand the listed results to full width of the text. Is this
> possible? Any help appreciated.
>
> Regards,
> aaron.
>
>
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Nick Gaens
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to