[Development] Qt Quick Controls: MenuStyle subMenuOverlap

Fabien Castan fabcastan at gmail.com
Sun Feb 23 15:38:42 CET 2014


Thanks,
Fabien



2014-02-22 19:02 GMT+01:00 Nurmi J-P <jpnurmi at digia.com>:

> On 22 Feb 2014, at 18:47, Fabien Castan <fabcastan at gmail.com> wrote:
>
> > Hi,
> >
> > I'm using QtQuick with Qt 5.2 on ubuntu 13.10 and by default there is a
> problem with menu and submenu.
> > There is a little spacing between the menu and the submenu. So when you
> go from the menu to the submenu, you leave the main menu before entering
> into the submenu... so the menu is closed!
> >
> > The problem comes from the menu style. I don't know why but it uses
> "QtQuick/Controls/Styles/Base/MenuStyle.qml" and not
> "Styles/Desktop/MenuStyle.qml".
> >
> > If I hack the "Styles/Desktop/MenuStyle.qml" and put "subMenuOverlap:
> -3" instead of -1. It works fine.
> >
> > So I have 3 questions:
> > - Is there a known bug about submenu overlap?
> > - Why is the "Base" style used instead of the "Desktop"?
> > - Is there a way to override the subMenuOverlap from my qml item?
>
> Hi,
>
> QGuiApplication is a likely cause for the Base style getting chosen. The
> desktop style uses QStyle from the QtWidgets module and thus requires
> QApplication. What comes to styling menus, MenuStyle has been made public
> in Qt 5.3.0.
>
> --
> J-P Nurmi
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140223/bbd2633e/attachment.html>


More information about the Development mailing list