Re: [Interest] [Development] [Announce] Qt 5.6.0 RC released
Hello List: Anybody running OSX El Capitan 10.11 with Qt 5.6.0 RC and IOS 9.2 and Xcode 7.2 and able to successfully debug under IOS Simulator? https://bugreports.qt.io/browse/QTCREATORBUG-15705 Any comments appreciated, md On Tue, Feb 23, 2016 at 11:41 PM, List for announcements regarding Qt releases and developmentwrote: > Hi all, > > > > Qt 5.6.0 RC is now released, see > http://blog.qt.io/blog/2016/02/23/qt-5-6-0-release-candidate-available/ > > > > Big thanks to everyone involved! > > > Best regards, > > Jani Heikkinen > > Release Manager | The Qt Company > > > > The Qt Company / Digia Finland Ltd, Elektroniikkatie 10, 90590 Oulu, Finland > > www.qt.io |Qt Blog: http://blog.qt.digia.com/ | Twitter: @QtbyDigia, > @Qtproject Facebook: www.facebook.com/qt > > > > > > ___ > Announce mailing list > annou...@qt-project.org > http://lists.qt-project.org/mailman/listinfo/announce > > ___ > Development mailing list > developm...@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development > ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QJSEngine replacement for QScriptEngine misses newFunction
Thanks Stephen! I found a solution, which is very similar to your approach. QJSValue myExt = m_engine->newQObject(new ScriptModuleMath()); // mount the whole class ScriptModule to the engine --> Math.sqrt(4) m_engine->globalObject().setProperty("Math", myExt); // mount only the sqrt function to the engine --> sqrt(4) m_engine->globalObject().setProperty("sqrt", myExt.property("sqrt")); the first mount allows me now to access the whole object and of course my sqrt() method. i.e. Math.sqrt(4); the second mount allows me to directly access the sqrt() method without the instance. i.e. sqrt(4); Thanks for your suggestion. Best Regards, Stefan -Original Message- From: Interest [mailto:interest-bounces+stefan.walter=lisec@qt-project.org] On Behalf Of Stephen Bryant Sent: Dienstag, 23. Februar 2016 15:12 To: interest@qt-project.org Subject: Re: [Interest] QJSEngine replacement for QScriptEngine misses newFunction Hi Stefan, On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote: [...] > > And in this way. I can use it then in the script: > value = sqrt(4); > > I actually don't want to map a whole QObject, because that would > require a call like this: value = MyMath.sqrt(4); > > Is there any way to achive in QJSEngine the same result as I do within > the QScriptEngine? Is far as I know, the only way is to do the thing you don't want to: map the whole QObject. You can, however, add a JS function reference inside the engine so you can call the function without the object name. QJSEngine engine; engine.globalObject().setProperty( "MyMath", engine.newQObject( new ScriptModuleMath( ) ) ); engine.evaluate( "var sqrt=MyMath.sqrt;" ); // repeat for other functions This will now work in JS: value = sqrt(4); You'll presumably be aware that all public slots of MyMath will automatically be available as JS functions. That makes things a little easier. It seems that you also need a QObject instance, event if you only want to expose static methods. BTW: your C++ native function can use this signature: double sqrt(double); You'll get NaN if somebody calls it with a non-number. The return value is also automatically converted as there is a QJSValue constructor that takes a double. There's no direct equivalent of read-only/undeletable, unfortunately. I'm missing that too. The closest you can get is that your MyMath functions can't be altered from JS, and you can also make a read-only Q_PROPERTY. However, there is nothing stopping somebody from reassigning properties of the global object - so your 'sqrt' function and 'MyMath' object could be replaced. This may be a security concern, depending on what you're doing. Best regards, Steve ___ 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] Has some examples about new version qt3d (5.5 or later) to operate 3d model mesh and sub mesh?
Hi Sean, This is a cool 3d demo(https://www.youtube.com/watch?v=zCBESbHSR1k )! Is this demo using assimp to load 3d model or using gltf to load 3d model ? BTW, Are you open this demo source code to public? Thanks Best Regards Jordon Wu 2016-02-23 15:58 GMT+08:00 Sean Harmer: > Hi, > > On 23/02/2016 07:04, Jordon Wu wrote: > > Hi list all, > > I'm begin study qt3d(qt5.5 version) now. And I want to found some examples > about 3d model mesh and sub mesh operation. > > I google found a good example QtQuick3D Tutorial - Car3D ( > http://www.youtube.com/watch?v=VvQ_NHKtHwE ), but this qt3d is V1.0 and > the example did not run on qt3d 5.5 or later. > > Has anyone know where could found example about qt3d to operate 3d model > mesh and sub mesh like above Car3D examples ? Thanks > > > Well, in making of this car demo, > https://www.youtube.com/watch?v=zCBESbHSR1k we simply exported the > submeshes we needed explicit control over as separate obj files and loaded > each one usign a Mesh component aggregated to an Entity. Each Entity has > it's own Transform component that we then bind properties to QML > expressions that reference the Qt Quick Controls, e.g. slider values or > boolean switches. > > You can also have all meshes in a single OBJ file and reference the sub > mesh you wish to render in the Mesh component. We tried this but found it > to be better to split them out as it allows more work to be done in > parallel at start up, leading to faster startup times. > > Cheers, > > Sean > > > > Best Regards > > Jordon Wu > > > > ___ > Interest mailing > listInterest@qt-project.orghttp://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
[Interest] QML Keys Shock
Hello List: I went to deploy a test app on Android and IOS that would test processing handling keys as they were entered into TextInput QML. Shockingly, the Keys.onPressed is NOT called for normal letters on either Android or IOS. Keys, like Back(delete) and Enter do trigger events, but forget about implementing PER keystroke logic on Android/IOS. Some bug tracker dialogue between Eskil Abrahamsen Blomfeldt kind of confirms this. Maybe the documentation for QML Keys should be updated to let people know that very FEW of the keys on the soft keyboard actually trigger onPressed events. Can someone tell me I am making a mistake and somehow ALL the keyboard keys like letters and space are triggered on Android and IOS soft keyboards if I only make some manifest.xml or info.plist entry! Cheers, marco ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Qt3D SceneLoader and TechniqueFilter
Hi, I import some objects into my scene via qgltf tool from project file and they are correctly rendered with Qt3D native materials (-S option) into the scene. Now, I want to add a technique to the default material effect to alter visual appearance of the objects without defining a whole new material (keeping default material parameters intact and just inject more parameters and change shaders). For this I recursively add a technique to the material effect of each entity of the loaded objects. However, the renderer (altered forward renderer) keeps using the default material despite the annotation I set on the technique (renderingStyle: myforward) and the TechniqueFilter I put on the framegraph matching the annotation. If instead of adding the technique I replace the previous ones by removing them prior to addition, the right technique is used but I lose the ability to filter to the previous technique. Now my questions are: How does TechniqueFilter process annotations in order to get the right one? What am I doing wrong? In case of multiple annotations in TechniqueFilter, do it have to match all annotations or one of the provided ones? In case of multiple annotations on Technique, does the TechniqueFilter have to match one of them or all of them? As a side note, RenderPassFilter seems to filter properly, at least with a single annotation. Thank you for your help. -- Unai IRIGOYEN ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Behaviour difference between Qt Version 5.4-0 and 5.5.1
On terça-feira, 23 de fevereiro de 2016 08:38:02 PST Günter Michel wrote: > Is this a bug? Do yo know a workaround ? It's known and fixed with commit 02f70004c266f4c35f098f49cfb3ca0284e28cac ("Allow socket events processing with a foreign event loop on Windows"), which fixes bugs QTBUG-49782 and QTBUG-48901. That commit is in 5.6 after the beta. Please upgrade to the 5.6 RC. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QJSEngine replacement for QScriptEngine misses newFunction
As a workaround you can use QQmlContext::setContextObject: QQmlEngine::rootContext()->setContextObject(myMath); On Tue, Feb 23, 2016 at 2:11 PM, Stephen Bryantwrote: > Hi Stefan, > > On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote: > [...] >> >> And in this way. I can use it then in the script: >> value = sqrt(4); >> >> I actually don't want to map a whole QObject, because that would require a >> call like this: value = MyMath.sqrt(4); >> >> Is there any way to achive in QJSEngine the same result as I do within the >> QScriptEngine? > > > Is far as I know, the only way is to do the thing you don't want to: map the > whole QObject. You can, however, add a JS function reference inside the > engine so you can call the function without the object name. > > QJSEngine engine; > engine.globalObject().setProperty( > "MyMath", > engine.newQObject( new ScriptModuleMath( ) ) > ); > engine.evaluate( "var sqrt=MyMath.sqrt;" ); // repeat for other functions > > This will now work in JS: value = sqrt(4); > > You'll presumably be aware that all public slots of MyMath will automatically > be available as JS functions. That makes things a little easier. > > It seems that you also need a QObject instance, event if you only want to > expose static methods. > > BTW: your C++ native function can use this signature: double sqrt(double); > You'll get NaN if somebody calls it with a non-number. The return value is > also automatically converted as there is a QJSValue constructor that takes a > double. > > > There's no direct equivalent of read-only/undeletable, unfortunately. I'm > missing that too. The closest you can get is that your MyMath functions can't > be altered from JS, and you can also make a read-only Q_PROPERTY. > > However, there is nothing stopping somebody from reassigning properties of the > global object - so your 'sqrt' function and 'MyMath' object could be replaced. > This may be a security concern, depending on what you're doing. > > > Best regards, > > Steve > ___ > 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 replacement for QScriptEngine misses newFunction
Hi Stefan, On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote: [...] > > And in this way. I can use it then in the script: > value = sqrt(4); > > I actually don't want to map a whole QObject, because that would require a > call like this: value = MyMath.sqrt(4); > > Is there any way to achive in QJSEngine the same result as I do within the > QScriptEngine? Is far as I know, the only way is to do the thing you don't want to: map the whole QObject. You can, however, add a JS function reference inside the engine so you can call the function without the object name. QJSEngine engine; engine.globalObject().setProperty( "MyMath", engine.newQObject( new ScriptModuleMath( ) ) ); engine.evaluate( "var sqrt=MyMath.sqrt;" ); // repeat for other functions This will now work in JS: value = sqrt(4); You'll presumably be aware that all public slots of MyMath will automatically be available as JS functions. That makes things a little easier. It seems that you also need a QObject instance, event if you only want to expose static methods. BTW: your C++ native function can use this signature: double sqrt(double); You'll get NaN if somebody calls it with a non-number. The return value is also automatically converted as there is a QJSValue constructor that takes a double. There's no direct equivalent of read-only/undeletable, unfortunately. I'm missing that too. The closest you can get is that your MyMath functions can't be altered from JS, and you can also make a read-only Q_PROPERTY. However, there is nothing stopping somebody from reassigning properties of the global object - so your 'sqrt' function and 'MyMath' object could be replaced. This may be a security concern, depending on what you're doing. Best regards, Steve ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest