Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QComboBox visible item populating issue

QComboBox visible item populating issue

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 488 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qt.1234
    wrote on last edited by
    #1

    Hi all,

    I have a QComboBox in my MainWindow. I have 10 items added to this ComboBox. And I have set the maxVisibleItem to just show 4 at a time. Users will have to use the up arrow key and down arrow key on keyboard to navigate the ComboBox. However, when the user navigate to the 5th item, the ComboBox's popup list is not repopulated and the 5th item is not seen on the popup and also did not see the highlight. Please advise. Thank you.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      What Qt version and OS? Please show some code.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      Q 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        What Qt version and OS? Please show some code.

        Q Offline
        Q Offline
        qt.1234
        wrote on last edited by
        #3

        @Christian-Ehrlicher qt version 5.4.0. the mmi interface is done using the qt creator, drag and drop.

        void MainWindow::on_down_slot()
        {
        
               int iIndex = ui->ui->comboxbox1->currentIndex() - 1;
               ui->comboxbox1->setCurrentIndex(iIndex);
        
        }
        

        so when down key is detected, the above slot will be executed.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved