Re: [Interest] compiling qt with eglfs
Hi. There are a couple of things I believe are related and would therefore help this discussion. Please let me know if you think this is a different topic, in which case I will open a separate mailing thread. Both of these are related to WebGL not working with Qt5 Beta, due to a lot of EGL surfaces (NativeWindow) being created with the eglfs plugin 1) a discussion that happened here -- http://qt-project.org/forums/viewthread/20188 2) a mail that I posted to [webkit-qt] community, but did not receive any response: I am running Qt5-Beta1 on mips platform using eglfs plugin. I am trying to run a simple WebGL example such as http://martinsikora.com/dart-webgl-simple-demo However, in the section where am supposed to see an animated triangle, I see a static image with strange symbols (such , mouse cursors etc). The image isn't random - always the same image appears. I do not use the webkit that comes with the Qt source archive, although I tried that, and the issue occurred in that too. I use a particular version of webkit from the mainline stream (webkit.org). I have also tried the very latest git-clone of qt5, and its webkit, and that has the issue too. Note that when I build the same webkit source-base as above with a Qt 4.8 installation (QWS mode with eglnullws), WebGL works fine, and am able to see the animated triangle. Other WebGL demos also seem to run okay. So one would think the issue does not lie in webkit, but I tried to debug the issue to see the call stack and noticed the below. For normal update of the WebView: QGLContext::makeCurrent() == QOpenGLContext::makeCurrent() == QEGLPlatformContext::makeCurrent() == eglMakeCurrent() This is followed by calls to eglSwapBuffers() in a similar call hierarchy and then doneCurrent() For the EglFSWindow that is opened to render the WebGL, I was able to observe such a call hierarchy only for makeCurrent(). There were no following calls to swapBuffers(). GraphicsContext3DPrivate::makeCurrentIfNeeded() == QOpenGLContext::makeCurrent() == QEGLPlatformContext::makeCurrent() == eglMakeCurrent() The call to the ultimate eglMakeCurrent() does indeed return true. I grepped for swapBuffers() within webkit, but could not find one for the Qt platform. I am not exactly sure how to proceed, as calls to m_platformContext-swapBuffers() manually leads to hangs and/or crashes. If you have faced a similar issue, or have any suggestions for me to go fwd, please let me know On Sat, Nov 10, 2012 at 5:25 AM, Girish Ramakrishnan gir...@forwardbias.inwrote: On Fri, Nov 9, 2012 at 3:53 PM, Girish Ramakrishnan gir...@forwardbias.in wrote: On Fri, Nov 9, 2012 at 4:22 AM, pritam.ghang...@gmail.com pritam.ghang...@gmail.com wrote: On Fri, Nov 9, 2012 at 11:16 AM, pritam.ghang...@gmail.com pritam.ghang...@gmail.com wrote: On Thu, Nov 8, 2012 at 8:06 PM, pritam.ghang...@gmail.com pritam.ghang...@gmail.com wrote: On Thu, Nov 8, 2012 at 8:00 PM, Samuel Rødal samuel.ro...@digia.com wrote: On 11/08/2012 01:55 PM, pritam.ghang...@gmail.com wrote: I am still stuck with qt 4.8.3 with qpa. It always compiles, but I never got it to work. Now when i try the application its failing at load time itself # ./hellogl_es2 -qpa -platform egl Failed to load platform plugin egl. Available platforms are: Minimal if I try Minimal, I get a segfault. ./hellogl_es2 -qpa -platform Minimal Segmentation fault backtrace from gdb shows that it crashes in QGLContext::chooseContext(QGLContext const*) () The minimal plugin doesn't support OpenGL. I have no idea what to do next. why didn't I get eglfs plugin when I had specified -egl in configure. Try specifying -eglfs and -opengl es2 when running configure and see what the configure output says. -eglfs was not recognized by configure as a valid option. I will try that tomorrow. I had tried specifying -qpa eglfs. But that didnt help. I compiled by actually going to src/plugins/platforms/eglfs. Surprisingly makefile was there. The build system ran qmake on it, but somehow never ran make. Right now I dont have board to test it. I will get board again tomorrow. I will test it and let you know. I have the plugin manually compiled. It loads but fails to create surface. Could not create the egl surface: error = 0x300b I think I need to do some platform specific patching in plugin. I am looking into that now. Finally I got graphcis working with qt 4.8.3 + egl + opengl with a little bit of custom platform initialization in qeglfsscreen.cpp. But now I have a new problem. No input in qpa application, neither mouse nor keyboard. I googled a little bit and found that I should supply -plugins manually while running application. ./animatedtiles -plugin LinuxInputMouse:/dev/input/mouse0 -qpa -platform EglFS Still no cursor or mouse input. Any ideas ? eglfs supports display of mouse cursor only in Qt.
[Interest] Qt5/OMAP4/EGLFS: Strange animation behaviour
Hi, some background first: for some little project I'm planning to prototype a custom UI. I got interested in Qt5, because of QML + Javascript. The OMAP4 platform I use (a modified Kindle Fire, but very similar to the Pandaboard) offers EGL/OGLES2 and I got some drivers running from TI directly on LinuxFB without XCB. I couldn't use their latest drivers SDK (only OMAP3), but please ask TI that question why they stopped delivering a driver SDK for their OMAP4 suddenly about a year ago. Qt5 compiles fine now against those drivers (see my previous post) and demos/examples run. Since then I also got extension stuff, e.g. from http://qt.gitorious.org/qtplayground/scenegraph to compile and run. The EGL/OGLES2 demos from TI run smoothly, despite some little tearing here and there. Only OGLES2Water seems to stutter about once a second, but let's take that as an exception. The TI driver is also configured for 4 buffers (!). There's a little tool provided that tells you how many buffers it manages to allocate and depending on how much memory is being reserved at boot time, I do see that it allocates also 1, 2, 3 buffers. From the TI demos I conclude that the driver seems to buffer, but don't always swap buffers correctly at VSYNC time. Although with some demos (e.g. OGLES2ChameleonMan) it's pretty hard to find any tearing. Now here's my problem: with unmodified Qt5 I don't get *any* smooth animation. As far as I understood Gunnar's blog posts at http://blog.qt.digia.com/blog/author/gunnar/ this should not happen with Qt5/eglfs, except maybe when I use Javascript, block the main thread with something else or run processes in the background. But none of the latter is the case. So, I digged a bit deeper. Here's what I tried: 1. according to Gunnar's post, Qt5 tries to predict animation states for the time a buffer is being displayed. So, I tried to find out what refresh rate Qt5 assumes and it's indeed hard-coded to 60Hz and not being overloaded by eglfs (see qplatformscreen.cpp, eglfs should be corrected to ask the driver for the display's refresh rate in my view). The Kindle Fire does some strange pixel-clock initialization and at the end seems to fall back to something very close to 50Hz. So, I changed that in the code = but, no effect at all. 2. I tried the stuff at http://qt.gitorious.org/qtplayground/scenegraph. The examples in the animators/test directory I did run with qmlscene. By default all of them are stuttering a lot, no matter wether it's the RenderThread or MainThread animation. Surprisingly, this changes once I hit the Block button. That starts an infinite javascript loop in the main thread. All of a sudden the RenderThread animation is perfectly smooth and the MainThread animation becomes sufficiently smooth, but just not as perfect as the RenderThread animation. Surprisingly, the process does not exceed 25% CPU even when running that Javascript loop, but without it uses 10%. I would expect ~0% without (most animations just update a single property) and 100% with that Javascript loop. And... I would have expected the animations to be smooth without the block loop and stuttering when it's running. 3. I did a tiny prototype qml animation and that runs really perfectly smooth using qmlscene on a MacBook Air (that's why we all love macs, right :-) ). Running the same on my platform stutters like the stuff from that playground scenegraph. Using RT objects and the Javascript main thread blocker loop improves smoothness a little bit, but not comparably as smooth as in the scenegraph demo. If Gunnar is listening to this list: I've no idea what is going on here :-). It actually behaves so much against all my predictions (except the TI demos) that I'm a bit puzzled. But maybe we can find out why it behaves so strange. Qt5 is not mandatory for my little project, so I could move forward with plain EGL/OGLES2, but using QML + Javascript would make things for me a lot easier. Thanks best, Stephan ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] HierarchicalHeaderView for a QTableView
On Thursday 15 November 2012 08:00:49 Alex Strickland wrote: On the plus side, the little example finally lifted the veil from my eyes about how MVC should work - I deleted tons of code and had a better solution. Just curious, because this can be misinterpreted. Did you delete all the MVC code, because it was too complicated, and you now have a better solution, or did you delete old code, because the MVC implementation is much simpler now? -- Christoph Feck http://kdepepo.wordpress.com/ KDE Quality Team ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010
Hi All, I’m developing a project with Qt4.8.3 on Win7/VS2010. I found a critical issue when calling QMessagebox::warning (actually, information(), critical() have the same issue too, but question() not). To duplicate the issue according the following steps: 1. Create a “Qt Application” project (named QtTest) in VS2010 by Qt Add-in with default settings. 2. Add an action, and call QMessageBox::warning() in its slots. 3. Create another DLL project (named MyDll) in VS2010, with a single export function (named foo). 4. Call the exported function “foo” in QtTest project. 5. Call ::MessageBox of Windows API in “DllMain” of MyDll project to show whether the DllMain with DLL_PROCESS_DETACH is called when program exiting. 6. Start the QtTest.exe, then exit, the ::MessageBox in DllMain of MyDll will be called. 7. Start the QtTest.exe, then trigger the action create in step#2, then exit, the MessageBox in DllMain of MyDll will not be called. Note, the issue may not be duplicate on very PC, I had tested more than 10 PCs, and about half PCs could duplicate this issue. As you know, when the DLL detach is not called, the other cleanup work won’t work too, such as destructors of local static objects and global objects won’t be called. The URL is the source code I mentioned above. http://pan.baidu.com/share/link?shareid=118233uk=2147844989 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Global QML slot?
Looks good, but I would use id's to make sure the signal arrives on the right element. Your UI structure changes and Id's give you more control. Row { id: row signal someOtherEvent(int number) Repeater { model: 10 delegate: MyRectangle { onSomeEvent: { row.someOtherEvent(index) } color: red } } } / juergen On Nov 8, 2012, at 12:08 AM, Mark mark...@gmail.com wrote: On Wed, Nov 7, 2012 at 11:56 PM, Nicolás Ulrich nikola...@gmail.com wrote: I'm still new at QML but... can't you do something like this? (assuming MyRectangle is declared on other file, as you said) Row { Repeater { signal someOtherEvent(int number) model: 10 delegate: MyRectangle { onSomeEvent: { parent.someOtherEvent(index) } color: red } } } or even use a function inside onSomeEvent:{} On Wed, Nov 7, 2012 at 7:35 PM, Mark mark...@gmail.com wrote: Hi, I have this case where i'm emitting a signal inside a repetitive structure like so: Row { Repeater { model: 10 delegate: MyRectangle { signal someEvent(int number) color: red MouseArea { anchors.fill: parent onClicked: { parent.someEvent(index) } } } } } In this case the delegate is a MyRectangle for demonstration purposes. In reality that delegate is separated out in a new file. The question is, how can i catch all those someEvent signals in one slot? I was hoping to be able to do something like: MyRectangle.onSomeEvent: { ... } But that doesn't work. The intention here was that MyRectangle.onSomeEvent would catch all the someEvent signals from the repeater.. Any ideas..? Cheers, Mark ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest That works.. But it feels a bit nasty :p Oh well, using that now. It's actually not using signal/slot connection anymore. It's just calling a function in the element one level above the repeater. ___ 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] qt-everywhere need license?
Today I use qt-everywhere to build a MIPS embedded version, but it told me can not use -embedded option as it's a license needed option. How to get a license to build qt-embedded ? Thanks all! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] [QTBUG-27554] New Qt 4.8.3 bug: invalid QtCore.vcxproj, MSVC10 error MSB3073
You can work-around this issue by using nmake or jom to build Qt instead of using the vcxproj files. Thanks for the suggestion. We currently use the vcxproj files generated by configure.exe because it allows us to easily build Qt through IncrediBuild (distributed compiling). For the time being, this works fine for us, but jom also looks interesting. Check the jom package at ftp://ftp.qt.nokia.com/jom/ It also includes ibjom, which allows distribution with Incredibuild. Maurice ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] need outrow animation for individual list element, without using timer
Hi, In the below code I am performing animation on list during entry and exit. Entry is working fine but I'm not getting desired animation on list exit. Here I'm using timer for exit animation on list. Is there any other way of performing exit animation on list, without using timer. Item { id: root width:640 height:480 focus: true ListModel { id: fruitModel ListElement { name: Apple; posx: 300; h: 20; i: 0; } ListElement { name: Banana; posx: 250; h: 25; i: 1; } ListElement { name: Cumquat; posx: 200; h: 30; i: 2; } ListElement { name: Durian; posx: 150; h: 35; i: 3; } } Component { id:listDelegate Item { id: delegateItem width:parent.width x: posx visible : false height: 0 property int pause: i * 1000 Text { id: listitem text: name //font.pointsize: 12 } Component.onCompleted : SequentialAnimation { PauseAnimation {duration : pause } PropertyAction { target: delegateItem; property: visible ; value : true } NumberAnimation { target : delegateItem ; property: height ; to : h; duration : 1000 * 2 ;easing.type: Easing.InOutQuad } } } } SequentialAnimation {id:outRow; running:false ParallelAnimation{ PropertyAnimation{ targer: view .currentitem} } PauseAnimation {duration : pause } PropertyAction { target: view.currentItem; property: visible ; value : true } NumberAnimation { target : view.currentItem; property: height ; to : h; duration : 100 * 2 ;easing.type: Easing.InOutQuad } } Timer{ Id:ouRowTimer Interval:300 Running:false Repeat:true onTriggered:{ outRow.running=true; view.currentIndex++; } } ListView { id: view anchors.fill : parent model:fruitModel delegate : listDelegate highlight { Item { Image { y:0 ; height:40 ; source : menu_focus.png } } } } } Thanks Sunil ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Unable to use QAbstractListModel with Pathview
Hi, I want to send a dynamic list form Qt to QML. I'm using QAbstractListModel and creating a model and sending the content to QML view Using QQuickView. This works fine if I use ListView. But, I wana replace ListView with PathView. Does anyone know how to do this. Thanks for the help in advance. Regards, K.K ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Possible memory leak in QXmlStreamReader
Hello everybody, we discovered a potential memory leak with an (admittedly somewhat unusual) use of QXmlStreamReader. Before reporting this as a bug, I wanted to get some opinions on whether this really is a bug or if we're just mis-using the interface. I've appended a code snippet that triggers the bug. Note that this runs a tight loop, so you might want to at a sleep() somewhere to avoid stalling your machine. When run, the virtual image size of the program quickly increases. Qt version is 4.8.1 as currently provided by ubuntu for the precise release (4.8.1-0ubuntu4.2), platform is 32 bit Ubuntu 12.04. #include QString #include QXmlStreamReader int main() { const QString xml = testfoobar/foobazzfrobozz/bazz/test; QXmlStreamReader stream; while (true) { stream.clear(); stream.addData(xml); while (stream.readNextStartElement()) { // NOP } } return 0; } -- Mit freundlichen Gruessen / Best regards Marc Schmitzer SW-Entwicklung ESWL / ESWT Software development ESWL / ESWT * Richard Wolf GmbH Pforzheimer Strasse 32 75438 Knittlingen Tel.: +49 7043 35-1107 Fax: +49 7043 35-1255 Email:marc.schmit...@richard-wolf.com Web: http://www.richard-wolf.com * +++ Richard Wolf GmbH, Pforzheimer Strasse 32, 75438 Knittlingen Managing Directors: Siegfried Karst, Alfons Notheis. Trade Register: Mannheim HRB 510031 +++ Richard Wolf GmbH routinely monitors the content of e-mail sent and received via its network for the purposes of ensuring compliance with its policies and procedures. Richard Wolf GmbH is not responsible for any changes made to the message after it has been sent. Where opinions are expressed, they are not necessarily those of Richard Wolf GmbH. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose, or otherwise use it or any part of it in any way. To do so may be unlawful. If you receive this e-mail by mistake, please advise the sender immediately. +++ ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010
Hi Xulei, I'm not at all into this, but could it be that QMessageBox::warning and your ::MessageBox call in MyDll do interfere? Also, is it safe to assume that a call to ::MessageBox actually does something the moment you get DLL_PROCESS_DETACH (which is during application shutdown, after all)? Maybe just find another way to check whether you get DLL_PROCESS_DETACH . Regards Kai From: interest-bounces+kai.koehne=digia@qt-project.org [interest-bounces+kai.koehne=digia@qt-project.org] on behalf of Xulei [xulei1...@126.com] Sent: 07 November 2012 03:57 To: interest@qt-project.org Subject: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010 Hi All, I’m developing a project with Qt4.8.3 on Win7/VS2010. I found a critical issue when calling QMessagebox::warning (actually, information(), critical() have the same issue too, but question() not). To duplicate the issue according the following steps: 1. Create a “Qt Application” project (named QtTest) in VS2010 by Qt Add-in with default settings. 2. Add an action, and call QMessageBox::warning() in its slots. 3. Create another DLL project (named MyDll) in VS2010, with a single export function (named foo). 4. Call the exported function “foo” in QtTest project. 5. Call ::MessageBox of Windows API in “DllMain” of MyDll project to show whether the DllMain with DLL_PROCESS_DETACH is called when program exiting. 6. Start the QtTest.exe, then exit, the ::MessageBox in DllMain of MyDll will be called. 7. Start the QtTest.exe, then trigger the action create in step#2, then exit, the MessageBox in DllMain of MyDll will not be called. Note, the issue may not be duplicate on very PC, I had tested more than 10 PCs, and about half PCs could duplicate this issue. As you know, when the DLL detach is not called, the other cleanup work won’t work too, such as destructors of local static objects and global objects won’t be called. The URL is the source code I mentioned above. http://pan.baidu.com/share/link?shareid=118233uk=2147844989 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010
Hi Xulei, I've always considered DllMain to be only used for thread based initialisations and finalisations. IIRC, it's design is flawed - process unload can occur without the individual thread unloads. This made it useless to disconnect thread specific database objects, for example. I'm amazed that window related calls like ::MessageBox are even allowed in DllMain, I certainly wouldn't expect them to work! You're better off using standard debugging interfaces like qDebug() to track things in DllMain. Tony. From: interest-bounces+tony=rightsoft.com...@qt-project.org [mailto:interest-bounces+tony=rightsoft.com...@qt-project.org] On Behalf Of Xulei Sent: Wednesday, 7 November 2012 1:58 PM To: interest@qt-project.org Subject: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010 Hi All, I'm developing a project with Qt4.8.3 on Win7/VS2010. I found a critical issue when calling QMessagebox::warning (actually, information(), critical() have the same issue too, but question() not). To duplicate the issue according the following steps: 1. Create a Qt Application project (named QtTest) in VS2010 by Qt Add-in with default settings. 2. Add an action, and call QMessageBox::warning() in its slots. 3. Create another DLL project (named MyDll) in VS2010, with a single export function (named foo). 4. Call the exported function foo in QtTest project. 5. Call ::MessageBox of Windows API in DllMain of MyDll project to show whether the DllMain with DLL_PROCESS_DETACH is called when program exiting. 6. Start the QtTest.exe, then exit, the ::MessageBox in DllMain of MyDll will be called. 7. Start the QtTest.exe, then trigger the action create in step#2, then exit, the MessageBox in DllMain of MyDll will not be called. Note, the issue may not be duplicate on very PC, I had tested more than 10 PCs, and about half PCs could duplicate this issue. As you know, when the DLL detach is not called, the other cleanup work won't work too, such as destructors of local static objects and global objects won't be called. The URL is the source code I mentioned above. http://pan.baidu.com/share/link?shareid=118233 http://pan.baidu.com/share/link?shareid=118233uk=2147844989 uk=2147844989 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010
I'm amazed that window related calls like ::MessageBox are even allowed in DllMain, I certainly wouldn't expect them to work! Actually, they aren't - and that for a good reason. If it works, it's plainly by accident. Rationale: Creating a HWND in Windows might trigger the loading of DLLs. However, a non-recursive mutex (it's commonly called LoaderMutex) is held by the system during processing of DllMain. Because of that, calls to DllMain are serialised in a queue, which results in: If you load a dll from within DllMain, you can be sure it is not yet initialized. I remember at least those 2 scenarios, where I've had much trouble with this: - Mixing managed and unmanaged code in one application. - Delayed-Loading of DLLs. From http://msdn.microsoft.com/en- us/library/windows/desktop/ms682583%28v=vs.85%29.aspx Calling functions that require DLLs other than Kernel32.dll may result in problems that are difficult to diagnose. For example, calling User, Shell, and COM functions can cause access violation errors, because some functions load other system components. Conversely, calling functions such as these during termination can cause access violation errors because the corresponding component may already have been unloaded or uninitialized. Because DLL notifications are serialized, entry-point functions should not attempt to communicate with other threads or processes. Deadlocks may occur as a result. Sascha ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5/OMAP4/EGLFS: Strange animation behaviour
On 11/15/2012 11:07 AM, Stephan Kanthak wrote: Hi, some background first: for some little project I'm planning to prototype a custom UI. I got interested in Qt5, because of QML + Javascript. The OMAP4 platform I use (a modified Kindle Fire, but very similar to the Pandaboard) offers EGL/OGLES2 and I got some drivers running from TI directly on LinuxFB without XCB. I couldn't use their latest drivers SDK (only OMAP3), but please ask TI that question why they stopped delivering a driver SDK for their OMAP4 suddenly about a year ago. Qt5 compiles fine now against those drivers (see my previous post) and demos/examples run. Since then I also got extension stuff, e.g. from http://qt.gitorious.org/qtplayground/scenegraph to compile and run. The EGL/OGLES2 demos from TI run smoothly, despite some little tearing here and there. Only OGLES2Water seems to stutter about once a second, but let's take that as an exception. The TI driver is also configured for 4 buffers (!). There's a little tool provided that tells you how many buffers it manages to allocate and depending on how much memory is being reserved at boot time, I do see that it allocates also 1, 2, 3 buffers. From the TI demos I conclude that the driver seems to buffer, but don't always swap buffers correctly at VSYNC time. Although with some demos (e.g. OGLES2ChameleonMan) it's pretty hard to find any tearing. Now here's my problem: with unmodified Qt5 I don't get *any* smooth animation. As far as I understood Gunnar's blog posts at http://blog.qt.digia.com/blog/author/gunnar/ this should not happen with Qt5/eglfs, except maybe when I use Javascript, block the main thread with something else or run processes in the background. But none of the latter is the case. So, I digged a bit deeper. Here's what I tried: 1. according to Gunnar's post, Qt5 tries to predict animation states for the time a buffer is being displayed. So, I tried to find out what refresh rate Qt5 assumes and it's indeed hard-coded to 60Hz and not being overloaded by eglfs (see qplatformscreen.cpp, eglfs should be corrected to ask the driver for the display's refresh rate in my view). The Kindle Fire does some strange pixel-clock initialization and at the end seems to fall back to something very close to 50Hz. So, I changed that in the code = but, no effect at all. 2. I tried the stuff at http://qt.gitorious.org/qtplayground/scenegraph. The examples in the animators/test directory I did run with qmlscene. By default all of them are stuttering a lot, no matter wether it's the RenderThread or MainThread animation. Surprisingly, this changes once I hit the Block button. That starts an infinite javascript loop in the main thread. All of a sudden the RenderThread animation is perfectly smooth and the MainThread animation becomes sufficiently smooth, but just not as perfect as the RenderThread animation. Surprisingly, the process does not exceed 25% CPU even when running that Javascript loop, but without it uses 10%. I would expect ~0% without (most animations just update a single property) and 100% with that Javascript loop. And... I would have expected the animations to be smooth without the block loop and stuttering when it's running. 3. I did a tiny prototype qml animation and that runs really perfectly smooth using qmlscene on a MacBook Air (that's why we all love macs, right :-) ). Running the same on my platform stutters like the stuff from that playground scenegraph. Using RT objects and the Javascript main thread blocker loop improves smoothness a little bit, but not comparably as smooth as in the scenegraph demo. Are you doing export QML_FORCE_THREADED_RENDERER=1? Because afaik without that you won't get the threaded renderer. Most issues I've seen with animations have been due to not using the threaded renderer. You might also want to try the customcontext renderer from ssh://codereview.qt-project.org:29418/playground/scenegraph.git After building and doing make install there you should be able to use it by doing export QMLSCENE_DEVICE=customcontext or running with --device=customcontext If it's a timing issue you might also try QML_FIXED_ANIMATION_STEP=1. -- Samuel ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Can I update contents in QScrollArea dynamically?
Hi Li, This seems to be a common mistake - adding widgets directly to the QScrollArea as child widgets, rather than using its setWidget. Read the docs - they are very clear. Tony. From: interest-bounces+tony=rightsoft.com...@qt-project.org [mailto:interest-bounces+tony=rightsoft.com...@qt-project.org] On Behalf Of Zhang, Li Sent: Friday, 2 November 2012 12:04 AM To: interest@qt-project.org Subject: [Interest] Can I update contents in QScrollArea dynamically? Hi All, I want to use a QScrollArea as a container of several buttons[or other components], and then I need to replace all of these buttons with new(also the amount of buttons is different). Current, I just add buttons to the QScrollArea, but can not remove all of them and update with new buttons... groupBox = new QGroupBox(ui-GCultureDetailedScrollArea); groupLayout = new QGridLayout(groupBox); groupBox-setLayout(groupLayout); groupLayout-setVerticalSpacing(15); groupLayout-setHorizontalSpacing(10); for(int i = 0; i 50; i++){ div for(int j = 0; j 3; j++){ QString buttonName = QString(button%1).arg(i+1); QPushButton *pbutton = new QPushButton(buttonName); //pbutton-resize(130, 40); pbutton-setMinimumWidth(140); pbutton-setMinimumHeight(40); pbutton-setStyleSheet(\ QPushButton{\ border-image: url(./pictures/button_groupactivities.png);\ nb sp;}\ QPushButton:pressed {\ border-image: url(./pictures/button_groupactivities_clicked.png);\ }\ ); groupLayout-addWidget(pbutton, i, j); } } So now how can I remove all of buttons in groupLayout an d add new ones. Anyone can give some suggestions? Thanks in advance! -- Best Regards, ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] qt-everywhere need license?
On quarta-feira, 17 de outubro de 2012 15.06.30, Qt maillist wrote: Today I use qt-everywhere to build a MIPS embedded version, but it told me can not use -embedded option as it's a license needed option. How to get a license to build qt-embedded ? Do you mean Qt 4.8.4 or Qt 5.0? If you meant 5.0, this option no longer exists. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center signature.asc Description: This is a digitally signed message part. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] delayRemove for custom models?
Hi, In a ListView you can do a delayRemove: true followed by the animations or other actions that once wants to do then delayRemove: false. That works just fine of the QML ListModel is used as a model, but how do you get that same mechanism working for custom models that come from C++? Cheers, Mark ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Curious behaviour of slider/spin when controlled by keyboard
Hello. I ran into a curious behaviour when writing a PyQt program but later found out that it is not particular to PyQt but exists in C++/Qt as well. I've attached minimal test cases. I note that in both the C++/PyQt minimal examples the bug is reproducible only when there is only a slider + a doubleSpin (2-widgets) and not when there is also an integer spin (3-widgets). When there is an integer spin in addition (3-widgets), there is some lagging behind between the widgets (as can be seen visually as well as in the debug output) but it gets through and I'm able to run the whole range using the keyboard, but if there is no integer spin and only the double spin with the slider (2-widgets) , the problem surfaces. It is clear this has something to do with the limitations of floating point data type (but I'm surprised it would surface even when only two decimal placesare involved). I presume others would have encountered such situations and would like advice on how to work around this limitation. The problem is as described below: Steps: 1. Let the focus be either on the slider or the spin. (The default slider/spin value is 0.50.) 3. Press up-arrow key to increase the slider/spin value. Observation: The value will not increase past 0.56. Steps: 4. Press down-arrow key to decrease the slider/spin value until 0.30. 5. Press down-arrow once more. Observation: The value jumps down from 0.30 to 0.28 even though the precision is set at 0.01. Step: 6. Press up-arrow. Observation: The value will now not rise above 0.28. Step: 7. Adjust the slider position using the mouse. Observation: The value can change to any value in its full range from 0.00 to 1.00. Step: 8. Adjust the slider using the mouse to go beyond 0.60. 9. Press down-arrow to decrease the value until 0.59. 10. Press down-arrow once more. Observation: 11. The value jumps down to 0.56. 12. It will no longer go above 0.56 using the keyboard (as before). -- Shriramana Sharma slider-minimal-test.tar.gz Description: GNU Zip compressed data ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Passing constructor arguments to an object that is to be run on a separate thread
tl;dr: we should stop teaching QObject::moveToThread as the recommended qt threading method reason: you can't safely use the same object in same-thread use and multi-thread use. it requires a special thread-aware object or glue code the [non auto-generated] QThread::run method also sucks because the _user_ will end up making a ton of useless QThread subclasses i propose more hackery. a moc hack, to be specific (because a preprocessor macro can't have Q_OBJECT in it) what is a PORTABLE way to save arguments (as auto-generated/invisible-to-user QThread subclass *constructor* argument(s)) to be passed in during the object instantiation/construction args from inside QThread::run? My concerns: 1) implitly shared reference count being 3 instead of 2 2) pointers becoming null before QThread::run is active 3) tons of other scenarios i am probably missing Is Q_ARG/QGenericArgument what I want? Or should I steal the code from however signals/slots does it? d3fault ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010
Sorry, the previous mail is not complete. continue... 5. As you see , there is a static local object in the foo(), the destructor of MyObj should be called when the program exiting. 1) If the QMessageBox::warning() were no't called, the desctructor of MyObj will be called normally. 2) *If the QMessageBox::warning() were called before the program exiting, the destructor of MyObj won't be called. It's ridiculous, isn't it? * By the way, I checked whether the destructor is called or not by set a breakpoint. The link the source code of the demo. https://dl.dropbox.com/u/60152607/QtTest.7z Thanks, Andrew 2012/11/16 Andrew Xu xulei...@gmail.com Hi All, I'm the author of this thread. Because I didn't receive the confirmation mail using 126.com mailbox, I changed to gmail mailbox. Seems the ::MessageBox comfused us, ok, forget it please. I found the issue when a destructor of a local static object wasn't called when my first Qt program exiting after calling QMessageBox::warning(). If I didn't called QMessageBox::warning(), the destructor was called normally. I modified the demo program. explain it here. 1. Create a “Qt Application” project (named QtTest) in VS2010 by Qt Add-in with default settings. 2. Add an action, and call QMessageBox::warning() in its slots. 3. Create another DLL project (named MyDll) in VS2010, with a single export function (named foo). class MyObj { public: ~MyObj() { printf(destructor called.\n); } void test() { printf(test() called\n); } }; void foo() { static MyObj obj; obj.test(); } 4. Call the exported function “foo()” in QtTest project. QtTest::QtTest(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) { ui.setupUi(this); // foo is exported in MyDll.dll, to make sure MyDll.dll is loaded foo(); } 5. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010
Am Freitag, 16. November 2012, 09:57:26 schrieb Andrew Xu: Sorry, the previous mail is not complete. continue... 5. As you memtioned, there is a static local object in the foo(), the destructor of MyObj should be called when the program exiting. 1) If the QMessageBox::warning() were no't called, the desctructor of MyObj will be called normally. 2) *If the QMessageBox::warning() were called before the program exiting, the destructor of MyObj won't be called. It's ridiculous, isn't it? * By the way, I checked whether the destructor is called or not by set a breakpoint. Was just about to ask that, since printf() might be buffered and a flush be required to make it appear somewhere. Generally spoken, the concept of global or function-local static objects in C++ is fundamentally flawed. The order in which things are called is undeterministic. It soley depends on the mood of the linker (for globals) and the invocation order (for function-local static objects). That being said, I'd strongly advice anybody not to use non-POD static objects. However, from the code-snippets and your description, this code _should_ world. But there might be some other pitfalls. One that comes to mind: When running a program a) from within VS by pressing F5 b) from within VS by choosing Run without debugger (or whatever it is named like in 2010) c) from a Shell d) from a Power-Shell e) from the Gui Windows uses different loading mechanisms. This is due to the invention of so called Application Domains and - more generally - to the very different nature of the loader for .NET based applications. Does your example show the same behaviour when run from within cmd.exe? You might want to download a copy of depends (http://dependencywalker.com). After opening your .exe inside Dependency Walker, you can press F7 and it will run your application, hooking deep into some Windows API and reporting about what _really_ happens, even every call to DllMain. You also said, it doesn't happen on every machine you tested. Might be that on your failing machines, some driver pulls in managed code (Verify by looking at how Proccess Explorer, downloadable from Microsoft, colors your process). This one of the many reasons, why DllMain (thus the static-destructors) would not be called correctly. Hope this helps, Sascha ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] calling QMessageBox::warning() may break the DLL detaching on VS2010
Hi Sascha, I know the orders of those desctructors is undeterministic, but, at least, they should be called. Anyway, there is the result of depends: Starting profile on 2012/11/16 at 10:36:43 Operating System: Microsoft Windows NT/2000/XP/2003/Vista based Ultimate (64-bit), version 6.01.7601 Service Pack 1 Program Executable: c:\users\xulei\desktop\qttest\debug\QTTEST.EXE Program Arguments: Starting Directory: C:\Users\Xulei\Desktop\QtTest\Debug\ Search Path: C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;D:\Program Files\Perforce\;D:\projects\wxWidgets-2.9.3\lib\vc_dll;D:\Program Files (x86)\Perforce\;D:\Program Files (x86)\Perforce;C:\Program Files (x86)\Perforce;C:\Program Files (x86)\Tencent\QQPCMgr\6.8.2396.401;C:\Program Files (x86)\Tencent\QQPCMgr\6.8.2396.401;D:\Program Files (x86)\Perforce\Server Options Selected: Simulate ShellExecute by inserting any App Paths directories into the PATH environment variable. Log DllMain calls for process attach and process detach messages. Log DllMain calls for all other messages, including thread attach and thread detach. Hook the process to gather more detailed dependency information. Log LoadLibrary function calls. Log GetProcAddress function calls. Log thread information. Use simple thread numbers instead of actual thread IDs. Log first chance exceptions. Log debug output messages. Use full paths when logging file names. Log a time stamp with each line of log. Automatically open and profile child processes. 00:00:00.000: Started c:\users\xulei\desktop\qttest\debug\QTTEST.EXE (process 0x554) at address 0x0028 by thread 1. Successfully hooked module. 00:00:00.000: Loaded c:\windows\syswow64\NTDLL.DLL at address 0x77A8 by thread 1. Successfully hooked module. 00:00:00.624: Loaded c:\program files\avast software\avast\SNXHK.DLL at address 0x7253 by thread 1. Successfully hooked module. 00:00:00.624: Loaded c:\windows\syswow64\KERNEL32.DLL at address 0x7675 by thread 1. Successfully hooked module. 00:00:00.639: Loaded c:\windows\syswow64\KERNELBASE.DLL at address 0x755E by thread 1. Successfully hooked module. 00:00:00.639: DllMain(0x755E, DLL_PROCESS_ATTACH, 0x) in c:\windows\syswow64\KERNELBASE.DLL called by thread 1. 00:00:00.639: DllMain(0x755E, DLL_PROCESS_ATTACH, 0x) in c:\windows\syswow64\KERNELBASE.DLL returned 1 (0x1) by thread 1. 00:00:00.639: DllMain(0x7675, DLL_PROCESS_ATTACH, 0x) in c:\windows\syswow64\KERNEL32.DLL called by thread 1. 00:00:00.639: DllMain(0x7675, DLL_PROCESS_ATTACH, 0x) in c:\windows\syswow64\KERNEL32.DLL returned 1 (0x1) by thread 1. 00:00:00.639: Injected c:\users\xulei\desktop\depends22_x86\DEPENDS.DLL at address 0x0837 by thread 1. 00:00:00.639: DllMain(0x7253, DLL_PROCESS_ATTACH, 0x) in c:\program files\avast software\avast\SNXHK.DLL called by thread 1. 00:00:00.655: DllMain(0x0837, DLL_PROCESS_ATTACH, 0x) in c:\users\xulei\desktop\depends22_x86\DEPENDS.DLL called by thread 1. 00:00:00.655: DllMain(0x0837, DLL_PROCESS_ATTACH, 0x) in c:\users\xulei\desktop\depends22_x86\DEPENDS.DLL returned 1 (0x1) by thread 1. 00:00:00.655: GetProcAddress(0x7675 [c:\windows\syswow64\KERNEL32.DLL], FlsAlloc) called from c:\program files\avast software\avast\SNXHK.DLL at address 0x7254827D and returned 0x76764F13 by thread 1. 00:00:00.655: 00:00:00.655: STATUS_STACK_BUFFER_OVERRUN encountered 00:00:00.655: Entrypoint reached. All implicit modules have been loaded. 00:00:00.655: Exited c:\users\xulei\desktop\qttest\debug\QTTEST.EXE (process 0x554) with code -1073740791 (0xC409) by thread 1. I checked the DLLs loaded with another machines which no issue, and the difference is the no-issue machine loaded more DLLs (they are several nvidia driver DLLs). Thanks, Andrew 2012/11/16 Sascha Cunz sascha...@babbelbox.org Am Freitag, 16. November 2012, 09:57:26 schrieb Andrew Xu: Sorry, the previous mail is not complete. continue... 5. As you memtioned, there is a static local object in the foo(), the destructor of MyObj should be called when the program exiting. 1) If the QMessageBox::warning() were no't called, the desctructor of MyObj will be called normally. 2) *If the QMessageBox::warning() were called before the program exiting, the destructor of MyObj won't be called. It's ridiculous, isn't it? * By the way, I checked whether the destructor is called or not by set a breakpoint. Was just
Re: [Interest] Qt5/OMAP4/EGLFS: Strange animation behaviour
I couldn't use their latest drivers SDK (only OMAP3), but please ask TI that question why they stopped delivering a driver SDK for their OMAP4 suddenly about a year ago. I cannot really comment on why, but am glad you got it working even with that older release. From the TI demos I conclude that the driver seems to buffer, but don't always swap buffers correctly at VSYNC time What Linux kernel version and package/distribution are you using ? If you can dump the environment log from script in below page, I can perhaps answer your VSYNC query: http://processors.wiki.ti.com/index.php/SGXDbg#Baselining_the_current_SGX_driver_environment regards Prabindh -Original Message- From: interest-bounces+prabu=ti@qt-project.org [mailto:interest-bounces+prabu=ti@qt-project.org] On Behalf Of Stephan Kanthak Sent: Thursday, November 15, 2012 3:37 PM To: interest@qt-project.org Subject: [Interest] Qt5/OMAP4/EGLFS: Strange animation behaviour Hi, some background first: for some little project I'm planning to prototype a custom UI. I got interested in Qt5, because of QML + Javascript. The OMAP4 platform I use (a modified Kindle Fire, but very similar to the Pandaboard) offers EGL/OGLES2 and I got some drivers running from TI directly on LinuxFB without XCB. I couldn't use their latest drivers SDK (only OMAP3), but please ask TI that question why they stopped delivering a driver SDK for their OMAP4 suddenly about a year ago. Qt5 compiles fine now against those drivers (see my previous post) and demos/examples run. Since then I also got extension stuff, e.g. from http://qt.gitorious.org/qtplayground/scenegraph to compile and run. The EGL/OGLES2 demos from TI run smoothly, despite some little tearing here and there. Only OGLES2Water seems to stutter about once a second, but let's take that as an exception. The TI driver is also configured for 4 buffers (!). There's a little tool provided that tells you how many buffers it manages to allocate and depending on how much memory is being reserved at boot time, I do see that it allocates also 1, 2, 3 buffers. From the TI demos I conclude that the driver seems to buffer, but don't always swap buffers correctly at VSYNC time. Although with some demos (e.g. OGLES2ChameleonMan) it's pretty hard to find any tearing. Now here's my problem: with unmodified Qt5 I don't get *any* smooth animation. As far as I understood Gunnar's blog posts at http://blog.qt.digia.com/blog/author/gunnar/ this should not happen with Qt5/eglfs, except maybe when I use Javascript, block the main thread with something else or run processes in the background. But none of the latter is the case. So, I digged a bit deeper. Here's what I tried: 1. according to Gunnar's post, Qt5 tries to predict animation states for the time a buffer is being displayed. So, I tried to find out what refresh rate Qt5 assumes and it's indeed hard-coded to 60Hz and not being overloaded by eglfs (see qplatformscreen.cpp, eglfs should be corrected to ask the driver for the display's refresh rate in my view). The Kindle Fire does some strange pixel-clock initialization and at the end seems to fall back to something very close to 50Hz. So, I changed that in the code = but, no effect at all. 2. I tried the stuff at http://qt.gitorious.org/qtplayground/scenegraph. The examples in the animators/test directory I did run with qmlscene. By default all of them are stuttering a lot, no matter wether it's the RenderThread or MainThread animation. Surprisingly, this changes once I hit the Block button. That starts an infinite javascript loop in the main thread. All of a sudden the RenderThread animation is perfectly smooth and the MainThread animation becomes sufficiently smooth, but just not as perfect as the RenderThread animation. Surprisingly, the process does not exceed 25% CPU even when running that Javascript loop, but without it uses 10%. I would expect ~0% without (most animations just update a single property) and 100% with that Javascript loop. And... I would have expected the animations to be smooth without the block loop and stuttering when it's running. 3. I did a tiny prototype qml animation and that runs really perfectly smooth using qmlscene on a MacBook Air (that's why we all love macs, right :-) ). Running the same on my platform stutters like the stuff from that playground scenegraph. Using RT objects and the Javascript main thread blocker loop improves smoothness a little bit, but not comparably as smooth as in the scenegraph demo. If Gunnar is listening to this list: I've no idea what is going on here :-). It actually behaves so much against all my predictions (except the TI demos) that I'm a bit puzzled. But maybe we can find out why it behaves so strange. Qt5 is not mandatory for my little project, so I could move forward with plain EGL/OGLES2, but using QML + Javascript would make things for me a lot easier. Thanks best,
Re: [Interest] Curious behaviour of slider/spin when controlled by keyboard
I would suggest filing a bug report on this. On 16/11/2012 3:58 AM, Shriramana Sharma wrote: Hello. I ran into a curious behaviour when writing a PyQt program but later found out that it is not particular to PyQt but exists in C++/Qt as well. I've attached minimal test cases. I note that in both the C++/PyQt minimal examples the bug is reproducible only when there is only a slider + a doubleSpin (2-widgets) and not when there is also an integer spin (3-widgets). When there is an integer spin in addition (3-widgets), there is some lagging behind between the widgets (as can be seen visually as well as in the debug output) but it gets through and I'm able to run the whole range using the keyboard, but if there is no integer spin and only the double spin with the slider (2-widgets) , the problem surfaces. It is clear this has something to do with the limitations of floating point data type (but I'm surprised it would surface even when only two decimal placesare involved). I presume others would have encountered such situations and would like advice on how to work around this limitation. The problem is as described below: Steps: 1. Let the focus be either on the slider or the spin. (The default slider/spin value is 0.50.) 3. Press up-arrow key to increase the slider/spin value. Observation: The value will not increase past 0.56. Steps: 4. Press down-arrow key to decrease the slider/spin value until 0.30. 5. Press down-arrow once more. Observation: The value jumps down from 0.30 to 0.28 even though the precision is set at 0.01. Step: 6. Press up-arrow. Observation: The value will now not rise above 0.28. Step: 7. Adjust the slider position using the mouse. Observation: The value can change to any value in its full range from 0.00 to 1.00. Step: 8. Adjust the slider using the mouse to go beyond 0.60. 9. Press down-arrow to decrease the value until 0.59. 10. Press down-arrow once more. Observation: 11. The value jumps down to 0.56. 12. It will no longer go above 0.56 using the keyboard (as before). ___ 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] Qt5/OMAP4/EGLFS: Strange animation behaviour
Hi Samuel, Am 15.11.2012 um 13:24 schrieb Samuel Rødal samuel.ro...@digia.com: On 11/15/2012 11:07 AM, Stephan Kanthak wrote: Hi, some background first: for some little project I'm planning to prototype a custom UI. I got interested in Qt5, because of QML + Javascript. The OMAP4 platform I use (a modified Kindle Fire, but very similar to the Pandaboard) offers EGL/OGLES2 and I got some drivers running from TI directly on LinuxFB without XCB. I couldn't use their latest drivers SDK (only OMAP3), but please ask TI that question why they stopped delivering a driver SDK for their OMAP4 suddenly about a year ago. Qt5 compiles fine now against those drivers (see my previous post) and demos/examples run. Since then I also got extension stuff, e.g. from http://qt.gitorious.org/qtplayground/scenegraph to compile and run. The EGL/OGLES2 demos from TI run smoothly, despite some little tearing here and there. Only OGLES2Water seems to stutter about once a second, but let's take that as an exception. The TI driver is also configured for 4 buffers (!). There's a little tool provided that tells you how many buffers it manages to allocate and depending on how much memory is being reserved at boot time, I do see that it allocates also 1, 2, 3 buffers. From the TI demos I conclude that the driver seems to buffer, but don't always swap buffers correctly at VSYNC time. Although with some demos (e.g. OGLES2ChameleonMan) it's pretty hard to find any tearing. Now here's my problem: with unmodified Qt5 I don't get *any* smooth animation. As far as I understood Gunnar's blog posts at http://blog.qt.digia.com/blog/author/gunnar/ this should not happen with Qt5/eglfs, except maybe when I use Javascript, block the main thread with something else or run processes in the background. But none of the latter is the case. So, I digged a bit deeper. Here's what I tried: 1. according to Gunnar's post, Qt5 tries to predict animation states for the time a buffer is being displayed. So, I tried to find out what refresh rate Qt5 assumes and it's indeed hard-coded to 60Hz and not being overloaded by eglfs (see qplatformscreen.cpp, eglfs should be corrected to ask the driver for the display's refresh rate in my view). The Kindle Fire does some strange pixel-clock initialization and at the end seems to fall back to something very close to 50Hz. So, I changed that in the code = but, no effect at all. 2. I tried the stuff at http://qt.gitorious.org/qtplayground/scenegraph. The examples in the animators/test directory I did run with qmlscene. By default all of them are stuttering a lot, no matter wether it's the RenderThread or MainThread animation. Surprisingly, this changes once I hit the Block button. That starts an infinite javascript loop in the main thread. All of a sudden the RenderThread animation is perfectly smooth and the MainThread animation becomes sufficiently smooth, but just not as perfect as the RenderThread animation. Surprisingly, the process does not exceed 25% CPU even when running that Javascript loop, but without it uses 10%. I would expect ~0% without (most animations just update a single property) and 100% with that Javascript loop. And... I would have expected the animations to be smooth without the block loop and stuttering when it's running. 3. I did a tiny prototype qml animation and that runs really perfectly smooth using qmlscene on a MacBook Air (that's why we all love macs, right :-) ). Running the same on my platform stutters like the stuff from that playground scenegraph. Using RT objects and the Javascript main thread blocker loop improves smoothness a little bit, but not comparably as smooth as in the scenegraph demo. Are you doing export QML_FORCE_THREADED_RENDERER=1? Because afaik without that you won't get the threaded renderer. Most issues I've seen with animations have been due to not using the threaded renderer. I didn't had much time to test yesterday, but that was a big step forward. The stuttering is gone and now tearing is a bit more obvious, but it's close to smooth. At least with eglfs. Minimalegl seems to behave differently. The animations there still show some more jumps, but overall they seem to run faster compared to eglfs with that env variable being set. You might also want to try the customcontext renderer from ssh://codereview.qt-project.org:29418/playground/scenegraph.git See my post, I already did :-). Although I still have to try again using the RenderThread stuff + that env variable in my own little QML application. After building and doing make install there you should be able to use it by doing export QMLSCENE_DEVICE=customcontext or running with --device=customcontext That's great info. I already wondered how customcontext gets used and I obviously didn't use it yet :-). If it's a timing issue you might also try QML_FIXED_ANIMATION_STEP=1 I will try all this on Monday
Re: [Interest] Qt5/OMAP4/EGLFS: Strange animation behaviour
Hi Prabindh, first hand info, that's very well appreciated :-) Am 16.11.2012 um 05:29 schrieb Sundareson, Prabindh pr...@ti.com: I couldn't use their latest drivers SDK (only OMAP3), but please ask TI that question why they stopped delivering a driver SDK for their OMAP4 suddenly about a year ago. I cannot really comment on why, but am glad you got it working even with that older release. Don't ask for the little hassles I went through :-). I already tried to get something working from drivers released by linaro/ubuntu which are newer, but unfortunately there are missing pieces (the release seems to include files for xcb/dri only). From the TI demos I conclude that the driver seems to buffer, but don't always swap buffers correctly at VSYNC time What Linux kernel version and package/distribution are you using ? If you can dump the environment log from script in below page, I can perhaps answer your VSYNC query: http://processors.wiki.ti.com/index.php/SGXDbg#Baselining_the_current_SGX_driver_environment Here you go: WSEGL settings [default] #WindowSystem=libpvrPVR2D_FRONTWSEGL.so #WindowSystem=libpvrPVR2D_FLIPWSEGL.so WindowSystem=libpvrPVR2D_LINUXFBWSEGL.so #WindowSystem=libpvrPVR2D_BLITWSEGL.so -- ARM CPU information Processor : ARMv7 Processor rev 3 (v7l) processor : 0 BogoMIPS: 599.13 processor : 1 BogoMIPS: 594.13 Features: swp half thumb fastmult vfp edsp thumbee neon vfpv3 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x1 CPU part: 0xc09 CPU revision: 3 Hardware: OMAP4430 Revision: 0010 Serial : -- SGX driver information Version 1.6.16.4117 (release) /home/stylon/prj/system/Graphics_SDK_4_04_00_03/GFX_Linux_KM System Version String: SGX revision = 1.2.0 -- Framebuffer settings fbset: not found -- Rotation settings 0 -- Kernel Module information Module Size Used byNot tainted bufferclass_ti 4712 0 omaplfb11507 0 pvrsrvkm 145076 2 bufferclass_ti,omaplfb -- Boot settings quiet mem=456M@0x8000 init=/init vram=10M omapfb.vram=0:10M vyres=1800 omapfb.vyres=1800 -- Linux Kernel version Linux localhost 2.6.35.7+ #47 SMP PREEMPT Tue Nov 6 23:12:37 CET 2012 armv7l GNU/Linux Please note that the kernel is pretty similar to the one Amazon released. I could have moved to 3.x already, but wanted to stay a bit more stable first. It still contains a lot of Android stuff, although I don't use the original pvrsrvkm, but instead the recompiled one from the driver package. regards Prabindh Thanks already best, Stephan -Original Message- From: interest-bounces+prabu=ti@qt-project.org [mailto:interest-bounces+prabu=ti@qt-project.org] On Behalf Of Stephan Kanthak Sent: Thursday, November 15, 2012 3:37 PM To: interest@qt-project.org Subject: [Interest] Qt5/OMAP4/EGLFS: Strange animation behaviour Hi, some background first: for some little project I'm planning to prototype a custom UI. I got interested in Qt5, because of QML + Javascript. The OMAP4 platform I use (a modified Kindle Fire, but very similar to the Pandaboard) offers EGL/OGLES2 and I got some drivers running from TI directly on LinuxFB without XCB. I couldn't use their latest drivers SDK (only OMAP3), but please ask TI that question why they stopped delivering a driver SDK for their OMAP4 suddenly about a year ago. Qt5 compiles fine now against those drivers (see my previous post) and demos/examples run. Since then I also got extension stuff, e.g. from http://qt.gitorious.org/qtplayground/scenegraph to compile and run. The EGL/OGLES2 demos from TI run smoothly, despite some little tearing here and there. Only OGLES2Water seems to stutter about once a second, but let's take that as an exception. The TI driver is also configured for 4 buffers (!). There's a little tool provided that tells you how many buffers it manages to allocate and depending on how much memory is being reserved at boot time, I do see that it allocates also 1, 2, 3 buffers. From the TI demos I conclude that the driver seems to buffer, but don't always swap buffers correctly at VSYNC time. Although with some demos (e.g. OGLES2ChameleonMan) it's pretty hard to find any tearing. Now here's my problem: with unmodified Qt5 I don't get *any* smooth animation. As far as I understood Gunnar's blog posts at http://blog.qt.digia.com/blog/author/gunnar/ this should not happen with Qt5/eglfs, except maybe when I use Javascript, block the main thread with something else or run processes in the background. But none of the latter is the case. So, I digged a bit deeper. Here's what I tried: 1. according to Gunnar's post, Qt5 tries to predict animation states for the time a buffer is being displayed. So, I tried to find out what refresh rate Qt5 assumes and
Re: [Interest] Curious behaviour of slider/spin when controlled by keyboard
I am unable to reproduce this, I am using Qt 4.8.1, both on windows and linux. Hello. I ran into a curious behaviour when writing a PyQt program but later found out that it is not particular to PyQt but exists in C++/Qt as well. I've attached minimal test cases. I note that in both the C++/PyQt minimal examples the bug is reproducible only when there is only a slider + a doubleSpin (2-widgets) and not when there is also an integer spin (3- widgets). When there is an integer spin in addition (3-widgets), there is some lagging behind between the widgets (as can be seen visually as well as in the debug output) but it gets through and I'm able to run the whole range using the keyboard, but if there is no integer spin and only the double spin with the slider (2-widgets) , the problem surfaces. It is clear this has something to do with the limitations of floating point data type (but I'm surprised it would surface even when only two decimal placesare involved). I presume others would have encountered such situations and would like advice on how to work around this limitation. The problem is as described below: Steps: 1. Let the focus be either on the slider or the spin. (The default slider/spin value is 0.50.) 3. Press up-arrow key to increase the slider/spin value. Observation: The value will not increase past 0.56. Steps: 4. Press down-arrow key to decrease the slider/spin value until 0.30. 5. Press down-arrow once more. Observation: The value jumps down from 0.30 to 0.28 even though the precision is set at 0.01. Step: 6. Press up-arrow. Observation: The value will now not rise above 0.28. Step: 7. Adjust the slider position using the mouse. Observation: The value can change to any value in its full range from 0.00 to 1.00. Step: 8. Adjust the slider using the mouse to go beyond 0.60. 9. Press down-arrow to decrease the value until 0.59. 10. Press down-arrow once more. Observation: 11. The value jumps down to 0.56. 12. It will no longer go above 0.56 using the keyboard (as before). -- Shriramana Sharma ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest