[Qt-interest] QtScript, passing a var as a QString to a slot
Rohan McGovern
rohan.mcgovern at nokia.com
Mon Mar 9 00:45:33 CET 2009
On Friday 06 March 2009, ext Jaco Naude wrote:
> Hi there
>
> I hope that someone can point me in the right direction here. I'm
> new to scripting with QtScript and I'm having some problems. I
> have the following two slots:
>
> Q_INVOKABLE bool MatrixAdd(const QString& variable_to_add, const
> QString& new_name); Q_INVOKABLE bool MatrixSubtract(const
> QString& variable_to_subtract, const QString& new_name, QString&
> result_string);
>
Hi,
You could consider rewriting these functions to return `void' and
have them throw script exceptions on error. The exception could
contain whatever information is interesting to you.
--
Rohan McGovern
Qt Software, Nokia
More information about the Qt-interest-old
mailing list