Ok, I couldn't actually make it work, but I have now abandoned the idea and will solve it without menus.
Thanks anyway :) - Thomas On Mon, May 18, 2015 at 9:33 PM, Mark Gaiser <[email protected]> wrote: > I meant a menu instead of tooltip. Sorry for any confusion there. > > As for how to use it, this is unknown territory for me since i never used > the platform components. I'm guessing you use them since you talk about a > Menu which is part of QtQuick.Controls. > What you "probably" want is setting a different style for the menu > container which can be done with the MenuStyle {} component [1]. > > Here you "probably" want to modify the styleData.type: MenuItemType.Menu. > It would look somewhat like this: > > MenuStyle { > id: yourStyle > styleData.type: MenuItemType.Menu > frame: Window { ... } > } > > Menu { > style: yourStyle > } > > This is a complete guess. I don't know if this would work for you. Others > can probably help you with more specific examples. > > [1] http://doc.qt.io/qt-5/qml-qtquick-controls-styles-menustyle.html > > On Mon, May 18, 2015 at 5:20 PM, Thomas Sevaldrud <[email protected]> > wrote: > >> Ok thanks, but I'm not sure I understood how to use this on a Menu. >> Should the Menu element be contained in this new toplevel window, or how >> should I use this? >> >> Cheers, >> Thomas >> >> On Mon, May 18, 2015 at 1:59 PM, Mark Gaiser <[email protected]> wrote: >> >>> Isn't that possible by re-implementing the tooltip using a Window {} >>> element and setting flags? >>> >>> Example: >>> >>> import QtQuick 2.4 >>> >>> import QtQuick.Window 2.2 >>> >>> import QtQuick.Controls 1.3 >>> >>> >>> Window { >>> >>> width: 360 >>> >>> height: 360 >>> >>> visible: true >>> >>> color: "#00000000" >>> >>> flags: Qt.FramelessWindowHint | Qt.WA_TranslucentBackground >>> >>> >>> Rectangle { >>> >>> width: 100 >>> >>> height: 100 >>> >>> color: "red" >>> >>> } >>> >>> } >>> >>> >>> Note: the color: "#00000000" is important! >>> >>> On Mon, May 18, 2015 at 12:23 PM, deDietrich Gabriel < >>> [email protected]> wrote: >>> >>>> Hi Thomas, >>>> >>>> >>>> This is currently unsupported, unfortunately. If you think it should, >>>> please open a suggestion on the bug tracker. >>>> >>>> >>>> Best regards, >>>> >>>> Dr. Gabriel de Dietrich >>>> Senior Software Developer >>>> The Qt Company — www.qt.io >>>> >>>> >>>> >>>> ------------------------------ >>>> *From:* interest-bounces+gabriel.dedietrich= >>>> [email protected] <interest-bounces+gabriel.dedietrich= >>>> [email protected]> on behalf of Thomas Sevaldrud < >>>> [email protected]> >>>> *Sent:* Friday, May 15, 2015 12:21 AM >>>> *To:* [email protected] >>>> *Subject:* [Interest] Transparent QML Menu >>>> >>>> Hi, I just wondered if it is possible to make a transparent Menu in >>>> QML? I have set up the background element in the MenuStyle as a >>>> semi-transparent rectangle, but it appears to be a white rectangle behind >>>> it that shows through. >>>> >>>> Thanks, >>>> Thomas. >>>> >>>> >>>> _______________________________________________ >>>> Interest mailing list >>>> [email protected] >>>> http://lists.qt-project.org/mailman/listinfo/interest >>>> >>>> >>> >>> _______________________________________________ >>> Interest mailing list >>> [email protected] >>> http://lists.qt-project.org/mailman/listinfo/interest >>> >>> >> >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
