[Interest] Update QComboBox items on opening the combo box

Adam Light aclight at gmail.com
Mon Jun 30 14:58:03 CEST 2014


On Mon, Jun 30, 2014 at 2:36 AM, André Hartmann <andre.hartmann at iseg-hv.de>
wrote:

> Hello all,
>
> I'd like to have a QComboBox with the available serial ports on my
> system. Populating the box at program start is easy, but I'd like to
> detect USB serial ports that are connected during run time.
>
> The only think I found is focusInEvent, but it seems my port list is
> updated twice, on opening the list and on closing it (Windows 7, Qt
> 4.8.2). Is there a better way to do?
>
> I'd really like to have something like QComboBox::onOpened().
> Borland C++ Builder had OnDropDown which for that purpose.
>
>
Check out the virtual method QComboBox::showPopup().

http://qt-project.org/doc/qt-4.8/qcombobox.html#showPopup

Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140630/3ccf55c1/attachment.html>


More information about the Interest mailing list