Hi,
simply assign id to one of the static items, e.g. firstStatic, and then use
firstStatic.parent instead of menu._contentColumn as parent for the
dynamic items -- this way you do not rely on implementation details:
menu: ContextMenu {
id: menu
MenuItem { id: firstStatic; text: Static
Please check ContextMenu and ComboBox code.
_contentColumn property used in a proper way.
QML is not C++ where you not allowed to reimplement headers to use
private and protected functions outside. QML is hack-for-fun.
On 24.11.2013 00:03, christopher.l...@thurweb.ch wrote:
We should not
Andrey
I beg to differ.
You can hack in any language, just as you can apply clean coding
conventions. QML is no different here, it is just a little less
rigorous in enforcing some conventions.
Just like any code, QML code will need maintaining, updating etc, so I
prefer to clean code
'protected' ? ;-)
I mean when a 'derived' component creted, altering/extending original
vehaviour, they canbe used.
But just guessing...
Zoltán
christopher.l...@thurweb.ch írta ekkor: 2013.11.24. 10:26
Andrey
I beg to differ.
You can hack in any language, just as you can apply clean
Hi Andrey
If the _underscore is, as we suspect an indication of internal only,
the next question is what is internal?
Internal could mean to the component itself.
However it could mean internal to Silica. Under this definition a
call from Combobox to ContextMenu could be regarded as
Hi Antoine
I think I had similar problems some months ago.
If I remember correctly, I had to explicitly resize the menu height
after adding items to it.
I will see if I can find the old code, and have a dig around in it ...
Chris
Zitat von Tigre-Bleu de...@tigre-bleu.net:
Hi,
I try to
Hi Antoine
I had a quick play around, and a peak back in my old code.
Just changing the menu height does not change anything.
I also tried a version of your code with just dynamic menuItems. The
menu did not drop, it just flashes.
The problem I was fighting with some months ago (and did my
you may need to make childs of menu._contentColumn, not just menu.
On 23.11.2013 19:47, Tigre-Bleu wrote:
Hi,
I try to dynamically populate a ContextMenu but either I ran into a bug in the
Silica Component or there is something I'm doing wrong.
Here is an example of simplified code showing
Hi Antoine
One useful technique for finding out what the Silica components are
doing (and how you may need to modify your code, or to prove a bug),
is to create a private clone of the problem component in your project.
In your case it is ContextMenu, which on my development host lives in
Hi Andrey
Zitat von Andrey Kozhevnikov coderusin...@gmail.com:
you may need to make childs of menu._contentColumn, not just menu.
I thought that the underscore stuff are private internal properties /
functions that we mere mortals should not be using 8-) (Not that
that would
You should use it if you want real dynamically created components.
Or reimplement ContextMenu item.
What would you prefer?
On 23.11.2013 21:06, christopher.l...@thurweb.ch wrote:
Hi Andrey
Zitat von Andrey Kozhevnikov coderusin...@gmail.com:
you may need to make childs of
-
De: Andrey Kozhevnikov coderusin...@gmail.com
À: christopher lamb christopher.l...@thurweb.ch, Sailfish OS Developers
devel@lists.sailfishos.org
Envoyé: Samedi 23 Novembre 2013 16:08:30
Objet: Re: [SailfishDevel] Dynamically populate a ContextMenu
You should use it if you want real dynamically
Just dont use dynamic childs if you dont want, but let it to others ;)
On 24.11.2013 00:03, christopher.l...@thurweb.ch wrote:
We should not have to make that choice.
using an underscore property is the pragmatic solution, but I would be
interested to hear what the Jolla developers have to
Agree with Cristopher. This is a workaround, but it should be fixed so that
no manual tweaking is needed. Just as in c++ - private is private.
--
Marcin
2013/11/23 Andrey Kozhevnikov coderusin...@gmail.com
Just dont use dynamic childs if you dont want, but let it to others ;)
On 24.11.2013
Sent from my BlackBerry 10
, 2013 10:14
To: christopher.l...@thurweb.ch
Reply To: Sailfish OS Developers
Cc: Sailfish OS Developers
Subject: Re: [SailfishDevel] Dynamically populate a ContextMenu
Just dont use dynamic childs if you dont want, but let it to others ;)
On 24.11.2013 00:03, christopher.l...@thurweb.ch wrote
16 matches
Mail list logo