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

ComboBox menu visible with default settings before stylesheet settings is applied

XMLWordPrintable

    • Windows

       

      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.

       

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

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

              Created:
              Updated:

                There are no open Gerrit changes