I tried your way like this:
for (int i = 0; i < centerPointsList.size (); i++)
{
QVariant holdInformation
= map
->page
()->mainFrame
()->evaluateJavaScript
(QString ("constructFileName (%1)").
arg (centerPointsList
[0].
toFloat ()));
for (int i = 0; i < centerPointsList.size (); i++)
{
QVariant holdInformation = map->page ()->mainFrame ()->evaluateJavaScript (QString ("constructFileName (%1)").arg (centerPointsList [0].toFloat ()));
To copy to clipboard, switch view to plain text mode
which resulted in:
"TypeError: Result of expression 'centerPointFileName.split' [undefined] is not a function. on line:65 Source:file:///..../index.html"
The function constructFileName (in Javascript) is as follows:
function constructFileName (centerPointFileName)
{
var removeSpaces = centerPointFileName.split (" ");
var fileNameWithoutSpaces = "", i;
for (i = 0; i < removeSpaces.length; i++)
fileNameWithoutSpaces = fileNameWithoutSpaces + removeSpaces [i];
function constructFileName (centerPointFileName)
{
var removeSpaces = centerPointFileName.split (" ");
var fileNameWithoutSpaces = "", i;
for (i = 0; i < removeSpaces.length; i++)
fileNameWithoutSpaces = fileNameWithoutSpaces + removeSpaces [i];
To copy to clipboard, switch view to plain text mode
Bookmarks