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. Is it possible to prevent hide popup in QComboBox?

Is it possible to prevent hide popup in QComboBox?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 431 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.
  • T Offline
    T Offline
    TomNow99
    wrote on last edited by
    #1

    Hi,

    I would like to prevent hide popup in my subclass of QComboBox.

    I tried:

    view()->viewport()->installEventFilter(this);
    

    and in bool myComboBox::eventFilter(QObject *object, QEvent *event):

        else if(event->type() == QEvent::Hide && dialog->isVisible())
        {
            return true;
        }
    

    but it doesn't works.

    And one more information: I would like only prevent hide popup when dialog is visible, so something like above.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Try overwrite
      https://doc.qt.io/qt-5/qcombobox.html#hidePopup
      and see if that makes it controllable.

      1 Reply Last reply
      1

      • Login

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