[Interest] QT Quick Controls - Menu
Webyte X
webyte at live.com
Fri Oct 11 06:22:19 CEST 2013
My intent was to use it for a standalone menu changing content (standard left hand menu changes right hand content). I accomplished what I was looking for with custom QML / Javascript. That said, I do think it's something easy to confuse for people new to the Controls API (which is most users since it's relatively new). Intuitively if you see a control called "Menu" and see documentation mentioning one of the use cases as standalone, you're liable to attempt to use it as a generic standalone menu. Also, after going through the code... there's a fair bit of overlap since most people designing a custom standalone menu are going to implement mouse handling, keyboard input, sub menus, styling, etc. Thanks for the follow up. Hope this sheds some light on where I was coming from.
From: Gabriel.deDietrich at digia.com
To: interest at qt-project.org
Date: Thu, 10 Oct 2013 14:24:54 +0000
Subject: Re: [Interest] QT Quick Controls - Menu
Hi,
I agree that the documentation is slightly misleading. There is private API to position the menu at any position, but for the moment it’s still… private. We may make it public in a way or another if we see demand for that.
BTW, what is your exact use case?
Best regards,
Dr. Gabriel de Dietrich
Senior Software Developer
qt.digia.com
On Oct 6, 2013, at 4:42 AM, Not Available <webyte at live.com> wrote:
After reading through both the documentation for Menu and the related source code (links listed below), I can’t figure out a way to use use the Menu for standalone use. The documentation states it can be used “as a standalone or context menu”. It’s clear how
it can be used as a context menu and in the menubar, but the source code seems to focus on popping the menu up at the mouse cursor. Am I missing something? Is there an easy way to use the Menu element for a standalone menu without jumping through error prone
hacking of the internals or recreating the functionality with a custom component? Any and all help is appreciated. Thanks.
Documentation:
http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-menu.html
Source
https://qt.gitorious.org/qt/qtquickcontrols/source/109dec4c8c3e5637998f2d1edd1ed8f721097010:src/controls/Menu.qml
https://qt.gitorious.org/qt/qtquickcontrols/source/109dec4c8c3e5637998f2d1edd1ed8f721097010:src/controls/qquickmenu.cpp
https://qt.gitorious.org/qt/qtquickcontrols/source/109dec4c8c3e5637998f2d1edd1ed8f721097010:src/controls/qquickmenu_p.h
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131011/2f77f1a7/attachment.html>
More information about the Interest
mailing list