Re: [Interest] find executable in Qt 4.8

2016-10-12 Thread Alexander Semke
> > in Qt5 we have http://doc.qt.io/qt-5/qstandardpaths.html#findExecutable .
> > Is there something similar available in Qt 4.8, too? Can somebody point
> > me to the proper static function?
> 
> No, there isn't in Qt. That function existed in libkdecore during Qt 4 days.
Thanks. KStandardDirs::findExe() does the job.

-- 
Alexander

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Android 7 issues

2016-10-12 Thread Jason H
Unforuntely the instructions http://doc.qt.io/qt-5/opensslsupport.html
don't work for OSX. https://github.com/openssl/openssl/issues/1531



> Sent: Wednesday, October 12, 2016 at 1:29 PM
> From: "Nuno Santos" 
> To: "Jason H" 
> Cc: "Qt Interest" 
> Subject: Re: [Interest] Android 7 issues
>
> QtCreator is not currently compatible with Android 7. We must wait for a fix. 
> 
> Also, you need to link your own OpenSSL in order to have SSL.
> 
> Nuno Santos
> Founder / CEO / CTO
> www.imaginando.pt
> +351 91 621 69 62
> 
> > On 12 Oct 2016, at 18:24, Jason H  wrote:
> > 
> > This message is part FYI, part question.  Using Qt 5.6.0 (for now, the 
> > 5.6.2 installer is running)
> > 
> > 
> > FYI:
> > When I run my app on the device, it doesn't have any network connectivity. 
> > Wifi is connected and working I get a 0 error code (which comes from the 
> > XMLHttpRequest) 
> > 
> > And in adb logcat, when trying to connect I see:
> > 10-12 13:14:51.349  3197  3398 W libexample.so: (null):0 ((null)): 
> > qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> > 10-12 13:14:51.349  3197  3398 W libexample.so: (null):0 ((null)): 
> > qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> > 10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
> > qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> > 10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
> > qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> > 10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
> > qt.network.ssl: QSslSocket: cannot call unresolved function SSL_ctrl
> > 
> > A few minutes later I get an android dialog:
> > """
> > Detected problems with app native libraries
> > (please consilt log for detail):
> > libQt5Core.so: unauthorized access to libcrypto.so 
> > libQt5Core.so: unauthorized access to libssl.so
> > """
> > 
> > It seems that most of these can be fixed by distributing our own version of 
> > OpenSSL. http://doc.qt.io/qt-5/opensslsupport.html
> > 
> > Question:
> > But also, in Creator's Application Output tab I get: 
> > """
> > Starting remote process.
> > 
> > Unable to start "com.company.example".
> > """
> > 
> > But as evidenced above, it does actually start. What does it take to get 
> > logcat working again?
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> 
> 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Android 7 issues

2016-10-12 Thread Nuno Santos
QtCreator is not currently compatible with Android 7. We must wait for a fix. 

Also, you need to link your own OpenSSL in order to have SSL.

Nuno Santos
Founder / CEO / CTO
www.imaginando.pt
+351 91 621 69 62

> On 12 Oct 2016, at 18:24, Jason H  wrote:
> 
> This message is part FYI, part question.  Using Qt 5.6.0 (for now, the 5.6.2 
> installer is running)
> 
> 
> FYI:
> When I run my app on the device, it doesn't have any network connectivity. 
> Wifi is connected and working I get a 0 error code (which comes from the 
> XMLHttpRequest) 
> 
> And in adb logcat, when trying to connect I see:
> 10-12 13:14:51.349  3197  3398 W libexample.so: (null):0 ((null)): 
> qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> 10-12 13:14:51.349  3197  3398 W libexample.so: (null):0 ((null)): 
> qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> 10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
> qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> 10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
> qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
> 10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
> qt.network.ssl: QSslSocket: cannot call unresolved function SSL_ctrl
> 
> A few minutes later I get an android dialog:
> """
> Detected problems with app native libraries
> (please consilt log for detail):
> libQt5Core.so: unauthorized access to libcrypto.so 
> libQt5Core.so: unauthorized access to libssl.so
> """
> 
> It seems that most of these can be fixed by distributing our own version of 
> OpenSSL. http://doc.qt.io/qt-5/opensslsupport.html
> 
> Question:
> But also, in Creator's Application Output tab I get: 
> """
> Starting remote process.
> 
> Unable to start "com.company.example".
> """
> 
> But as evidenced above, it does actually start. What does it take to get 
> logcat working again?
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Android 7 issues

2016-10-12 Thread Jason H
This message is part FYI, part question.  Using Qt 5.6.0 (for now, the 5.6.2 
installer is running)


FYI:
When I run my app on the device, it doesn't have any network connectivity. 
Wifi is connected and working I get a 0 error code (which comes from the 
XMLHttpRequest) 

And in adb logcat, when trying to connect I see:
10-12 13:14:51.349  3197  3398 W libexample.so: (null):0 ((null)): 
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
10-12 13:14:51.349  3197  3398 W libexample.so: (null):0 ((null)): 
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_ctrl
10-12 13:14:51.354  3197  3398 W libexample.so: (null):0 ((null)): 
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_ctrl

A few minutes later I get an android dialog:
"""
Detected problems with app native libraries
(please consilt log for detail):
libQt5Core.so: unauthorized access to libcrypto.so 
libQt5Core.so: unauthorized access to libssl.so
"""

It seems that most of these can be fixed by distributing our own version of 
OpenSSL. http://doc.qt.io/qt-5/opensslsupport.html

Question:
But also, in Creator's Application Output tab I get: 
"""
Starting remote process.

Unable to start "com.company.example".
"""

But as evidenced above, it does actually start. What does it take to get logcat 
working again?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Shawn Rutledge

> It probably wasn't mentioned because it's got a bad reputation as being slow. 
> It's easy to abuse it and end up with crappy performance. As long as you 
> limit the amount of painting you do and how often you do it, I don't think 
> using it is really an issue in practice.
...
> like Canvas is not the really good solution - just a workaround. That is, it 
> not claims to be "support for arbitrary shapes in QtQuick".

Yes Canvas uses QPainter to render a texture on the CPU, which is then uploaded 
to the GPU.  Besides the drawing commands being in Javascript.

It’s not that bad in practice, just not as efficient as it could be.  You might 
not be able to redraw it at 60FPS.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Oleg Evseev
> It probably wasn't mentioned because it's got a bad reputation as being
> slow. It's easy to abuse it and end up with crappy performance. As long as
> you limit the amount of painting you do and how often you do it, I don't
> think using it is really an issue in practice.


I see, thanks for help!
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QtBluetooth Low Energy: How to find my peripheral?

2016-10-12 Thread Prashant Vaibhav
Oops, pasted wrong bug report link.
I meant this: https://bugreports.qt.io/browse/QTBUG-46008 



Kind Regards,
Prashant Vaibhav



> On 12 Oct 2016, at 16:34, Prashant Vaibhav  
> wrote:
> 
> Hi Alexander,
> 
> Comments inline below. Thanks.
> 
> Kind Regards,
> Prashant Vaibhav
> 
> 
> 
>> On 12 Oct 2016, at 15:45, Alexander Blasche > > wrote:
>> 
>> 
>> 
>>> -Original Message-
>>> From: Interest [mailto:interest-bounces+alexander.blasche=qt.io 
>>> @qt-
>>> project.org ] On Behalf Of Prashant Vaibhav
>>> Sent: Wednesday, 12 October 2016 13:45
>>> To: interest@qt-project.org 
>>> Subject: [Interest] QtBluetooth Low Energy: How to find my peripheral?
>>> 
>>> Hi all,
>>> 
>>> I’m using QtBluetooth low energy API on Qt 5.7 / Android 5/6. Targeting API 
>>> level
>>> 19 (android 4.4+).
>> 
>> What are you using Qt 5.6 or 5.7?
> 
> I’m using Qt 5.7.0.
> 
>> 
>>> My problem is that I cannot find a way to decide which of the BLE devices
>>> returned during scan is mine:
>>> 
>>> - The advertising data is inaccessible (no API).
>>> - The QBluetoothDeviceInfo.serviceUuids() function returns nothing 
>>> (apparently
>>> it’s for classic bluetooth)
>>> - The QBluetoothDeviceInfo.name() function is null (empty string)
>> 
>>> So the only information I have is the rssi (QBluetoothDeviceInfo.rssi()), 
>>> which is
>>> not enough to figure out the scanned device is ours. Furthermore, I cannot 
>>> show
>>> a list to the user to pick the device manually, since all it will have is 
>>> the signal level
>>> (and perhaps MAC address).
>> 
>> 
>> I believe you may experience https://bugreports.qt.io/browse/QTBUG-54867 
>> .
>> 
>> It was fixed in Qt 5.6.2 and 5.7.1. Alternatively you may cherry-pick the 
>> referenced patches into your Qt build.
> 
> Thanks for the link, I checked and it doesn’t seem relevant to my issue. Our 
> BLE device doesn’t have major/minor numbers in its advertising packet. It 
> does have the primary service UUID (128 bit) which we are using to identify 
> it on iOS (native code).
> 
> Perhaps you meant https://bugreports.qt.io/browse/QTBUG-54867 
>  ?
> 
>> 
>> --
>> Alex

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QtBluetooth Low Energy: How to find my peripheral?

2016-10-12 Thread Prashant Vaibhav
Hi Alexander,

Comments inline below. Thanks.

Kind Regards,
Prashant Vaibhav



> On 12 Oct 2016, at 15:45, Alexander Blasche  wrote:
> 
> 
> 
>> -Original Message-
>> From: Interest [mailto:interest-bounces+alexander.blasche=qt.io 
>> @qt-
>> project.org ] On Behalf Of Prashant Vaibhav
>> Sent: Wednesday, 12 October 2016 13:45
>> To: interest@qt-project.org 
>> Subject: [Interest] QtBluetooth Low Energy: How to find my peripheral?
>> 
>> Hi all,
>> 
>> I’m using QtBluetooth low energy API on Qt 5.7 / Android 5/6. Targeting API 
>> level
>> 19 (android 4.4+).
> 
> What are you using Qt 5.6 or 5.7?

I’m using Qt 5.7.0.

> 
>> My problem is that I cannot find a way to decide which of the BLE devices
>> returned during scan is mine:
>> 
>> - The advertising data is inaccessible (no API).
>> - The QBluetoothDeviceInfo.serviceUuids() function returns nothing 
>> (apparently
>> it’s for classic bluetooth)
>> - The QBluetoothDeviceInfo.name() function is null (empty string)
> 
>> So the only information I have is the rssi (QBluetoothDeviceInfo.rssi()), 
>> which is
>> not enough to figure out the scanned device is ours. Furthermore, I cannot 
>> show
>> a list to the user to pick the device manually, since all it will have is 
>> the signal level
>> (and perhaps MAC address).
> 
> 
> I believe you may experience https://bugreports.qt.io/browse/QTBUG-54867 
> .
> 
> It was fixed in Qt 5.6.2 and 5.7.1. Alternatively you may cherry-pick the 
> referenced patches into your Qt build.

Thanks for the link, I checked and it doesn’t seem relevant to my issue. Our 
BLE device doesn’t have major/minor numbers in its advertising packet. It does 
have the primary service UUID (128 bit) which we are using to identify it on 
iOS (native code).

Perhaps you meant https://bugreports.qt.io/browse/QTBUG-54867 
 ?

> 
> --
> Alex

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Mitch Curtis
It probably wasn't mentioned because it's got a bad reputation as being slow. 
It's easy to abuse it and end up with crappy performance. As long as you limit 
the amount of painting you do and how often you do it, I don't think using it 
is really an issue in practice.


From: Interest  on behalf 
of Oleg Evseev 
Sent: Wednesday, 12 October 2016 1:48:54 PM
To: Qt Project
Subject: Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to 
Popup?

Great thanks, Shawn.

Canvas is what I searching for!

Even in canvas example there is a Talk bubble example that is look similar to 
tipped Popup!
[Встроенное изображение 1]

Canvas is Qt Quick Item, so it is quite easy to add it on the scene and add a 
shadows (or other effects) to it
[Встроенное изображение 2]
and use it as background for Qt Quick Controls.

Only thing that I miss is the inner border in Canvas (to be identical to 
Rectangle drawing principle). But for simple tipped popup (rectangle with 
rounded corners and tip) it was quite easy to recalculate coordinates points.
Plus, apparently there is the other solution with globalCompositeOperation 
http://stackoverflow.com/a/34234589/5765076 for complex shapes (didn't test it).

I made tipped rectangle with Canvas and it looks great!

I really surprised, why using Canvas item was not suggested in first place?!

And you, Shawn, write this:

... we've always needed support for arbitrary shapes in QtQuick.  We’ll have 
them eventually…

like Canvas is not the really good solution - just a workaround. That is, it 
not claims to be "support for arbitrary shapes in QtQuick".

Why? How your ideal support for arbitrary shapes in QtQuick will look like in 
general words, then?

What about Canvas vs QSGGeometry Node approach? Only performance aspects?

--
Regards, Oleg.

2016-10-10 10:41 GMT+03:00 Shawn Rutledge 
>:
You can add two rotated rectangles, one underneath for the border, and one (on 
top) for the fill, to cover up the edge of the main rectangle.  Next you will 
want a drop shadow, then you need a couple more Rectangles (or something from 
GraphicalEffects) underneath.

This is a good illustration of why we've always needed support for arbitrary 
shapes in QtQuick.  We’ll have them eventually…

Meanwhile you can use Canvas (draw the shape) or BorderImage (pull edge, corner 
and center pieces from an image and assemble them into a resizable balloon).

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QtBluetooth Low Energy: How to find my peripheral?

2016-10-12 Thread Alexander Blasche


> -Original Message-
> From: Interest [mailto:interest-bounces+alexander.blasche=qt.io@qt-
> project.org] On Behalf Of Prashant Vaibhav
> Sent: Wednesday, 12 October 2016 13:45
> To: interest@qt-project.org
> Subject: [Interest] QtBluetooth Low Energy: How to find my peripheral?
> 
> Hi all,
> 
> I’m using QtBluetooth low energy API on Qt 5.7 / Android 5/6. Targeting API 
> level
> 19 (android 4.4+).

What are you using Qt 5.6 or 5.7?

> My problem is that I cannot find a way to decide which of the BLE devices
> returned during scan is mine:
> 
> - The advertising data is inaccessible (no API).
> - The QBluetoothDeviceInfo.serviceUuids() function returns nothing (apparently
> it’s for classic bluetooth)
> - The QBluetoothDeviceInfo.name() function is null (empty string)

> So the only information I have is the rssi (QBluetoothDeviceInfo.rssi()), 
> which is
> not enough to figure out the scanned device is ours. Furthermore, I cannot 
> show
> a list to the user to pick the device manually, since all it will have is the 
> signal level
> (and perhaps MAC address).


I believe you may experience https://bugreports.qt.io/browse/QTBUG-54867.

It was fixed in Qt 5.6.2 and 5.7.1. Alternatively you may cherry-pick the 
referenced patches into your Qt build.

--
Alex
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Oleg Evseev
Jérôme, I didn't understand what your suggestion for?

One can easy draw round cornered rectangle with Canvas (see roundedrect.qml
in canvas example)
[image: Встроенное изображение 1]

Based on that example I did my rectangle (with *all *rounded corners) with
tip in one draw path and solved my problem.

2016-10-12 16:32 GMT+03:00 Jérôme Godbout :

> For the round corner with rectangle:
>
> Rectangle
> {
>   border.width: 2
>   border.color: "black"
>   color: Qt.rgba(0,0,0,0)
>   clip: true
>   width: canvas_.width
>   height: canvas_.height
>   Canvas
>   {
> ...
>   }
> }
>
> Using the clip and the round corner should work.
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Jérôme Godbout
For the round corner with rectangle:

Rectangle
{
  border.width: 2
  border.color: "black"
  color: Qt.rgba(0,0,0,0)
  clip: true
  width: canvas_.width
  height: canvas_.height
  Canvas
  {
...
  }
}

Using the clip and the round corner should work.

On Wed, Oct 12, 2016 at 7:48 AM, Oleg Evseev  wrote:

> Great thanks, Shawn.
>
> Canvas is what I searching for!
>
> Even in canvas example there is a Talk bubble example that is look similar
> to tipped Popup!
> [image: Встроенное изображение 1]
>
> Canvas is Qt Quick Item, so it is quite easy to add it on the scene and
> add a shadows (or other effects) to it
> [image: Встроенное изображение 2]
> and use it as background for Qt Quick Controls.
>
> Only thing that I miss is the inner border in Canvas (to be identical to
> Rectangle drawing principle). But for simple tipped popup (rectangle with
> rounded corners and tip) it was quite easy to recalculate coordinates
> points.
> Plus, apparently there is the other solution with globalCompositeOperation
> http://stackoverflow.com/a/34234589/5765076 for complex shapes (didn't
> test it).
>
> I made tipped rectangle with Canvas and it looks great!
>
> *I really surprised, why using Canvas item was not suggested in first
> place?!*
>
> And you, Shawn, write this:
>
> ... we've always needed support for arbitrary shapes in QtQuick.  We’ll
>> have them eventually…
>
>
> like Canvas is *not *the really good solution - just a workaround. That
> is, it not claims to be "support for arbitrary shapes in QtQuick".
>
> Why? How your ideal support for arbitrary shapes in QtQuick will look like
> in general words, then?
>
> What about Canvas vs QSGGeometry Node approach? Only performance aspects?
>
> --
> Regards, Oleg.
>
> 2016-10-10 10:41 GMT+03:00 Shawn Rutledge :
>
>> You can add two rotated rectangles, one underneath for the border, and
>> one (on top) for the fill, to cover up the edge of the main rectangle.
>> Next you will want a drop shadow, then you need a couple more Rectangles
>> (or something from GraphicalEffects) underneath.
>>
>> This is a good illustration of why we've always needed support for
>> arbitrary shapes in QtQuick.  We’ll have them eventually…
>>
>> Meanwhile you can use Canvas (draw the shape) or BorderImage (pull edge,
>> corner and center pieces from an image and assemble them into a resizable
>> balloon).
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Oleg Evseev
Great thanks, Shawn.

Canvas is what I searching for!

Even in canvas example there is a Talk bubble example that is look similar
to tipped Popup!
[image: Встроенное изображение 1]

Canvas is Qt Quick Item, so it is quite easy to add it on the scene and add
a shadows (or other effects) to it
[image: Встроенное изображение 2]
and use it as background for Qt Quick Controls.

Only thing that I miss is the inner border in Canvas (to be identical to
Rectangle drawing principle). But for simple tipped popup (rectangle with
rounded corners and tip) it was quite easy to recalculate coordinates
points.
Plus, apparently there is the other solution with globalCompositeOperation
http://stackoverflow.com/a/34234589/5765076 for complex shapes (didn't test
it).

I made tipped rectangle with Canvas and it looks great!

*I really surprised, why using Canvas item was not suggested in first
place?!*

And you, Shawn, write this:

... we've always needed support for arbitrary shapes in QtQuick.  We’ll
> have them eventually…


like Canvas is *not *the really good solution - just a workaround. That is,
it not claims to be "support for arbitrary shapes in QtQuick".

Why? How your ideal support for arbitrary shapes in QtQuick will look like
in general words, then?

What about Canvas vs QSGGeometry Node approach? Only performance aspects?

--
Regards, Oleg.

2016-10-10 10:41 GMT+03:00 Shawn Rutledge :

> You can add two rotated rectangles, one underneath for the border, and one
> (on top) for the fill, to cover up the edge of the main rectangle.  Next
> you will want a drop shadow, then you need a couple more Rectangles (or
> something from GraphicalEffects) underneath.
>
> This is a good illustration of why we've always needed support for
> arbitrary shapes in QtQuick.  We’ll have them eventually…
>
> Meanwhile you can use Canvas (draw the shape) or BorderImage (pull edge,
> corner and center pieces from an image and assemble them into a resizable
> balloon).
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Jan 'Koviš' Struhár

On 10/12/2016 01:42 PM, Ulf Hermann wrote:


QJSEngine does not cache the compilation results if you just pass in 
plain strings. I also don't think QScriptEngine can do this here (but 
I haven't checked). QScriptEngine might be clever enough to 
automatically use the interpreter rather than JIT-compiling such 
small expressions. You can set the QV4_FORCE_INTERPRETER environment 
variable to force QJSEngine to use the interpreter rather than the JIT.


In any case it's a waste to parse the expressions from strings over 
and over and to not use the JIT. If you care about performance, you 
should try to parse the expressions only once.


Uhm ... the secret here is that you keep a QScriptProgram as the 
m_expression of your label item, which is basically a JS function 
compiled for QScript. So, of course, if you take the source code from 
that and then recompile it for QJSEngine on every iteration it will be 
slower than if you evaluate it straight away in QScriptEngine. If you 
instead kept a QJSValue with the same expression written as a JS 
function, QJSEngine would probably be much faster as QScriptEngine 
would have to recompile on each iteration. 
That was probably the silver bullet I looked for. It did not poke me in 
the eye when I read through QJSEngine docs.

I am just on evaluation your tip - many thanks for advice!
Jan
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QtBluetooth Low Energy: How to find my peripheral?

2016-10-12 Thread Prashant Vaibhav
Hi all,

I’m using QtBluetooth low energy API on Qt 5.7 / Android 5/6. Targeting API 
level 19 (android 4.4+).

My problem is that I cannot find a way to decide which of the BLE devices 
returned during scan is mine:

- The advertising data is inaccessible (no API).
- The QBluetoothDeviceInfo.serviceUuids() function returns nothing (apparently 
it’s for classic bluetooth)
- The QBluetoothDeviceInfo.name() function is null (empty string)

So the only information I have is the rssi (QBluetoothDeviceInfo.rssi()), which 
is not enough to figure out the scanned device is ours. Furthermore, I cannot 
show a list to the user to pick the device manually, since all it will have is 
the signal level (and perhaps MAC address).

Any ideas?

Kind Regards,
Prashant Vaibhav


Head of Software Development • TobyRich GmbH
首席软件工程师 • TobyRich 有限公司 

Konsul-Smidt-Straße 8e · 28217 Bremen · Germany · www.tobyrich.com 

Tel.: +4942138878410 · Mob.: +4917691446264 · Skype: pvaibhav.tobyrich







___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann



QJSEngine does not cache the compilation results if you just pass in plain 
strings. I also don't think QScriptEngine can do this here (but I haven't 
checked). QScriptEngine might be clever enough to automatically use the 
interpreter rather than JIT-compiling such small expressions. You can set the 
QV4_FORCE_INTERPRETER environment variable to force QJSEngine to use the 
interpreter rather than the JIT.

In any case it's a waste to parse the expressions from strings over and over 
and to not use the JIT. If you care about performance, you should try to parse 
the expressions only once.


Uhm ... the secret here is that you keep a QScriptProgram as the m_expression 
of your label item, which is basically a JS function compiled for QScript. So, 
of course, if you take the source code from that and then recompile it for 
QJSEngine on every iteration it will be slower than if you evaluate it straight 
away in QScriptEngine. If you instead kept a QJSValue with the same expression 
written as a JS function, QJSEngine would probably be much faster as 
QScriptEngine would have to recompile on each iteration.

Ulf
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann



The usage scenario fits my needs, that is the reason to evaluate exactly this 
way.

I mean - should the QScriptEngine be deprecated, the QQmlEngine/QJSEngine 
should also have ways to utilize some form of JIT/preparse. Even in the first 
pass where JIT cannot be effective (or when I parse just the text expression) 
QScriptEngine beats newer and more shiny QJSEngine a lot. That is confusing to 
me and my point - why is QJSEngine offered as replacement of QScriptEngine when 
it is so much slower?


QJSEngine does not cache the compilation results if you just pass in plain 
strings. I also don't think QScriptEngine can do this here (but I haven't 
checked). QScriptEngine might be clever enough to automatically use the 
interpreter rather than JIT-compiling such small expressions. You can set the 
QV4_FORCE_INTERPRETER environment variable to force QJSEngine to use the 
interpreter rather than the JIT.

In any case it's a waste to parse the expressions from strings over and over 
and to not use the JIT. If you care about performance, you should try to parse 
the expressions only once.

Ulf
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] find executable in Qt 4.8

2016-10-12 Thread noname

Hi,

I don't know about anything alike in Qt4, but reading the docs it seems 
quite straightforward and not too much work to implement that function 
yourself?
Of course, it depends on how to detect "executables". By name, maybe 
trying out extensions (like ".exe", ".bat", ".cmd" on Windows) would be 
easy and fast (regarding performance). Parsing the file (or just 
checking the magic number) header might be some more work (and be 
somewhat slower) I guess.
Only thing requiring more effort, as I imagine, might be to 
differenciate many platforms or ones very different from the "common" 
ones (Windows, Linux, etc.).



kind regards

On 11.10.2016 22:30, Alexander Semke wrote:

Hi,

in Qt5 we have http://doc.qt.io/qt-5/qstandardpaths.html#findExecutable . Is
there something similar available in Qt 4.8, too? Can somebody point me to the
proper static function?

Regards,
Alexander
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Jan 'Koviš' Struhár

On 10/12/2016 11:40 AM, Ulf Hermann wrote:

QJSValue result = qmlEngine.evaluate(item.m_expression.sourceCode());


I guess you are mostly profiling the JIT compiling, not the actual 
evaluation. In order to get realistic results you should keep the 
compiled representation of the expression around, e.g. as a JS 
function. From the docs:



QJSValue fun = myEngine.evaluate("(function(a, b) { return a + b;})");

> QJSValueList args; args << 1 << 2;
>QJSValue threeAgain = fun.call(QJSValue(), args); regards,
Ulf 
The usage scenario fits my needs, that is the reason to evaluate exactly 
this way.


I mean - should the QScriptEngine be deprecated, the 
QQmlEngine/QJSEngine should also have ways to utilize some form of 
JIT/preparse. Even in the first pass where JIT cannot be effective (or 
when I parse just the text expression) QScriptEngine beats newer and 
more shiny QJSEngine a lot. That is confusing to me and my point - why 
is QJSEngine offered as replacement of QScriptEngine when it is so much 
slower?


Jan
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.6.2 release date

2016-10-12 Thread André Somers



Op 11/10/2016 om 13:03 schreef Jargo Kõster:

Hello,

does anyone know when bill be Qt 5.6.2 released...latest updated plan 
was 27th September 2016?


Thanks

It has been released today: 
http://blog.qt.io/blog/2016/10/12/qt-5-6-2-released/


André

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Fw: Qt for winrt, Windows Phone lock screen controls

2016-10-12 Thread Maurice Kalinowski
Hi,

It’s a bit hard to guess what is going on without seeing any actual code. What 
do you refer to with “referencing” ? And how is that other cpp involved in the 
whole project?
Please have a look at qtmain_winrt in qtbase (or rather winmain static lib). 
There is a lot of things happening before a Qt app enters main(), as in create 
an ApplicationOverride, initialize threads, etc.

Another reason might be the threading model, depending on which native feature 
you want to use, you might only be allowed to do so from the Xaml thread. 
Again, without seeing any code it is hard to evaluate.

BR,
Maurice


From: Interest 
[mailto:interest-bounces+maurice.kalinowski=qt...@qt-project.org] On Behalf Of 
areeb waseem via Interest
Sent: Tuesday, October 11, 2016 7:56 PM
To: interest@qt-project.org
Subject: [Interest] Fw: Qt for winrt, Windows Phone lock screen controls


On Tuesday, October 11, 2016 10:50 PM, areeb waseem 
> wrote:

Hi,
   I have been developing a background media player for windows phone 10. I 
have ported my project to visual studio and added native windows API to access 
windows media and windows phone lock screen controls.
When i call the whole API from inside int main(), the lockscreen controls work. 
But when i call it from other cpp class through referencing, the lock screen 
controls appear, but they are unresponsive.
I would really appreciate your help regarding the solution.
Thank you

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest