Skip to main content

wt::widget

wt::widget

Functions

Name
void configureScrollableComboPopup(QComboBox * combo, int max_visible_items =kDefaultComboMaxVisibleItems)
Force a QListView-based popup and cap visible rows.

Attributes

Name
int kDefaultComboMaxVisibleItems
Default number of visible rows before the popup shows a scrollbar.

Functions Documentation

function configureScrollableComboPopup

void configureScrollableComboPopup(
    QComboBox * combo,
    int max_visible_items =kDefaultComboMaxVisibleItems
)

Force a QListView-based popup and cap visible rows.

Parameters:

  • combo Non-owning combo box to configure.
  • max_visible_items Maximum rows shown before scrolling (default 15).

Precondition: combo must not be null.

Postcondition: combo uses a scroll-limited list popup when opened.

On Gtk+/Linux, non-editable QComboBox popups use a native menu that ignores maxVisibleItems. Setting combobox-popup: 0 switches to an internal list view that honors the row cap and scrolls for the remaining items.

Attributes Documentation

variable kDefaultComboMaxVisibleItems

int kDefaultComboMaxVisibleItems = 15;

Default number of visible rows before the popup shows a scrollbar.


Updated on 2026-11-13 at 20:25:41 +0000