Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109712

ComboBox menu visible with default settings before stylesheet settings is applied

    XMLWordPrintable

Details

    • Windows

    Description

       

      To reproduce, create a combo box and apply the following stylesheet:

      QComboBox {
      color: white;
      background-color: black;
      margin: 10px;
      }
       
      QComboBox QAbstractItemView {
      color: white;
      background-color: black;
      margin: 10px;
      }
      

       

      Set these window flag:

      ui.comboBox->view()->window()->setWindowFlags( Qt::Popup | Qt::FramelessWindowHint |Qt::NoDropShadowWindowHint); 
      ui.comboBox->view()->window()->setAttribute(Qt::WA_TranslucentBackground);
       
      

       

      How it looks:

      The menu is visible with her "full width" before the margin is applied.

      Why it didn't became visible only after the stylesheet is applied? Then this weird behavior wouldn't be noticeable.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            cesa caio cesar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes