title: Qt: huge scrollable sub-menu loses items
body: <p><strong>Updated to add:</strong></p>
  
  <p>I have fixed this, after a fashion. First, I tried calling <code>MySubmenu -&gt; clear()</code> and rebuilding the sub-menu whenever the parent menu was clicked. Surprisingly, this didn't work. So I brought in the big guns: <code>delete MySubmenu</code> followed by <code>MySubmenu = new QMenu (MyMainWindow)</code> and rebuilding the sub-menu. It works now, without much noticeable delay. So I'm happy, I suppose.</p>
  
  <p><strong>Original question:</strong></p>
  
  <p>I have a sub-menu with about 1000 items in it (it's a list of C functions in a debugger). By default, Qt displays the sub-menu in columns, but this sub-menu is too big to fit on the screen, and I have no way to access the items that don't fit.  </p>
  
  <p>So I made the sub-menu scrollable, using a style sheet:</p>
  
  <pre><code>MySubmenu -&gt; setStyleSheet ("* { menu-scrollable: 1 }") ;
  </code></pre>
  
  <p>It looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/hedza.jpg" alt="Big menu"></p>
  
  <p>Note the scroll buttons at the top and bottom. But now if I select an item (PopRecordLength in this example), then the next time I open the sub-menu, all items above PD_DecryptCommand have disappeared:</p>
  
  <p><img src="https://i.stack.imgur.com/18Gt3.jpg" alt="Bad menu"></p>
  
  <p>The scroll button at the top has disappeared (the little line you can see is an underscore from what used to be the previous item.) And if I scroll down to the bottom, there is a large empty space. The total size of the sub-menu hasn't changed, but the items above PD_DecryptCommand have disappeared off the top, and I can't access them with mouse or keyboard.  </p>
  
  <p>However...I have just discovered, in the process of preparing this post, that if I click on this large empty space, the sub-menu disappears, but the next time I open it, it has been restored to its original state. So there is a work-around. But it's not very friendly.  </p>
  
  <p>Is this a bug in Qt? Or am I not setting the style sheet correctly?</p>