Zeljan<br><br>I changed :<br><br>TQtWSMenuItem.AttachMenu<br>TQtWSMenuItem.CreateMenuFromMenuItem<br>TQtWSMenuItem.CreateHandle<br><br>and added method TQtMenuBar.addMenuWithIcon.<br><br>The problem I was trying to solve is that icons don't show on top-level QT menuitems. They show nicely with GTK2 and Windows bindings.<br>
There was another related problem: when there was an icon (ImageIndex) defined for a top-level menuitem then icons from all sub-menus disappeared, too.<br>It was easy to fix by not setting icon for the QT top-level menus in CreateHandle.<br>
<br>I still failed to fix the problem properly. I was able to get either text or icon to show but not both. Is it possible that QT can't do it?<br>There is even an API call that takes both icon and title as params. See below.<br>
<br>My experimental TQtMenuBar.addMenuWithIcon calls <br> QMenuBar_addMenu(handle: QMenuBarH; icon: QIconH; title: PWideString)<br>in hope that both text and icon would show. They don't. Only icon shows and sub-menus don't work. The func returns QMenuH which should be used somehow I guess.<br>
<br>I also refactored TQtMenuBar.SetActions out from TQtMenuBar.insertMenu.<br>While debugging it I noticed that after each menu item addition it clears GlobalActions and then fills it.<br>It slows down polynomially when menu items are added. Yet, it does not cause a visible slowdown.<br>
<br>
I don't have more ideas. Could you please look at the icon related code.<br><br>Juha<br><br>