[texworks] SCRIPT Prototype: A work in progress - LaTeX xcolor colour names dialogue
Paul A Norman
paul.a.norman at gmail.com
Fri May 28 01:14:34 CEST 2010
On 28 May 2010 03:03, Stefan Löffler <st.loeffler at gmail.com> wrote:
> Hi again,
> Am 2010-05-27 13:34, schrieb Paul A Norman:
> When I get to it, how do I invoke the QColorDialog from Script please?
> I just experimented a little bit, and I'm afraid it's not as easy as I
> thought. The normal UiLoader doesn't provide it.
I have been involved in seeing php used as a scripting language to
Delphi projects. There quite often more generic top level objects are
exposed to script, that enabled script to do virtually anything that
the host programme can do. I realise there may be real security fears,
but defining a safe and a stable approach to this might enable things
to happen more easily.
For example if such a thing were done, could script create new
widgets/forms etc on the fly?
In the example I just quoted that was possible, as generic functions
were prepared and made available to script, and some of the exposed
objects in the executable provided those resources any way.
> However, QColorDialog is one of the system-standard dialogs (such as getInt,
> getDouble, etc., which we already have). So I think we should add the
> following dialogs to the TW context:
> * QColorDialog
> * QFontDialog (not very useful, but for completeness)
> * QFileDialog (either directly (i.e., the script needs to set all
> properties), or these static methods: getExistingDirectory,
> getOpenFileName(s), getSaveFileName)
It does seem useful to actually provide the base one even if more
specific functions are made available in these cases.
Then someone can dig deeper if there is something else needed, and we
can make wrapper libraries at script level, which still leaves the
'bigger' picture open. The Qt documentation is quite well organised
and can be followed relatively easily, plus there are other support
Has any one found a site specialising in Qt scripting matters handling
some of the sorts of topics that have come up here in the last day
Others must have struck this Q_Invok able... problem perhaps and found
More information about the texworks