Re: [Interest] Terminating a QThread

2013-06-21 Thread Etienne Sandré-Chardonnal
Except in this particular case where: - The flag is set to false at the start of the thread - Set to true for stopping by the controlling(parent) thread (writen, never read) - Checked by the thread as a quit condition (read, never written) In that case, there is absolutely no possible race cond

Re: [Interest] Terminating a QThread

2013-06-21 Thread Thiago Macieira
On sábado, 22 de junho de 2013 12.41.10, Tony Rietwyk wrote: > But a bool value can be cached indefinitely, so make sure you declare the > flag as volatile! That's wrong and has been explained away several times. You need to declare it as atomic, not as volatile. -- Thiago Macieira - thiago.macie

Re: [Interest] Terminating a QThread

2013-06-21 Thread Tony Rietwyk
But a bool value can be cached indefinitely, so make sure you declare the flag as volatile! Tony From: interest-bounces+tony=rightsoft.com...@qt-project.org [mailto:interest-bounces+tony=rightsoft.com...@qt-project.org] On Behalf Of Etienne Sandré-Chardonnal Sent: Friday, 21 June 20

[Interest] Getting the QQuickView that created a QMediaService instance or requested a QMediaPlayerControl

2013-06-21 Thread Luca Carlon
Hi! I'm working on a plugin for hardware acceleration of Media Player Qt API. To do this I need to run some code on the scene graph thread. All the possible ways I've been given to do this require to somehow access the QQuickWindow in which the service is created. But can I do this from the QMedi

[Interest] compile touch example in Qt5

2013-06-21 Thread Charles Krinke
I am trying to compile the touch examples in Qt-5.0.2 in the qt5base-5.0.2/examples/touch directory. I can do a qmake with my mkspec, but then when I do a make, nothing is compiled and I get a message "nothing to be done for first". Is there some additonal enviroment variable or machination requi

Re: [Interest] Qt Installer Framework example

2013-06-21 Thread Muhammad Bashir Al-Noimi
On 06/21/2013 06:07 PM, Muhammad Bashir Al-Noimi wrote: Howdy, I'm working on learning how to use IFW, I tried to run its examples to understand how to use it specially I suffer from documentation lacking, but I failed to run this example (testapp)

[Interest] Qt Installer Framework example

2013-06-21 Thread Muhammad Bashir Al-Noimi
Howdy, I'm working on learning how to use IFW, I tried to run its examples to understand how to use it specially I suffer from documentation lacking, but I failed to run this example (testapp)

[Interest] Apologize

2013-06-21 Thread Muhammad Bashir Al-Noimi
Howdy, Many users complained from my messages over this mailing list (and other lists) because I'm sending only HTML formatted messages although I configured my e-mail client to send PlainText & HTML format. Recently (since weeks ago) I discovered the cause of this problem

Re: [Interest] Terminating a QThread

2013-06-21 Thread Etienne Sandré-Chardonnal
Hi, This was my case, but after a careful study of how the event loop and queued signal/slot connection works, I figured it out and everything works cleanly now. It's easy to have this issue, as if you ask the thread to quit via a signal/slot, you have to ensure that nothing is destroyed or blocke

Re: [Interest] Terminating a QThread

2013-06-21 Thread alexander golks
Am Fri, 21 Jun 2013 15:50:16 +0200 schrieb Etienne Sandré-Chardonnal : > Well, after a quick test, it seems that terminate is not working under > windows (at least, not working as expected by reading the manual). > just to put in my 2 windows cents: sometimes my threads even don't stop when i qu

Re: [Interest] Terminating a QThread

2013-06-21 Thread Etienne Sandré-Chardonnal
Well, after a quick test, it seems that terminate is not working under windows (at least, not working as expected by reading the manual). That's a very good occasion for you to re-think your code and make it work without terminate. There is nothing less clean than terminate (just remind that, amon

Re: [Interest] Terminating a QThread

2013-06-21 Thread francois cellier
André, my idea was more to continue the discussion of the qt-project.org forum. In my first post on this list I precised the conclusion we have made on the qt-project.org forum post that is to say the different behaviours of the two approaches using the worker approach or not. My question in th

Re: [Interest] Turn off default window hints in X11 using Qt5

2013-06-21 Thread Ramakanthreddy_Kesireddy
Hi, I have tried the same earlier to achieve frameless window with no title,minimize,maximize and close button hints. However, it seems that window manager ignores the same while trying to set using setFlags API. On target board, currently Ubuntu 12.04 desktop image is flashed. Does it helps

Re: [Interest] Terminating a QThread

2013-06-21 Thread André Somers
Op 21-6-2013 10:06, francois cellier schreef: Dear all, Even if I know that it can be dangerous to terminate a thread, I need to do it for my application. Are you really going to completely re-do the discussion you already had on the qt-project.org forums? André -- You like Qt? I am looking

Re: [Interest] Terminating a QThread

2013-06-21 Thread francois cellier
Thanks Etienne and Mandeep for your answers. However as I wrote in my initial post (in the code of the objectInThread class), in my real application I do not have a while loop just a sequence of functions. With a while loop and the flag the code is clean like that. However, in my case that mean

[Interest] Is it possible to select an option from drop down in a webpage

2013-06-21 Thread Sujan Dasmahapatra
I am able to load an webpage using QWebView. In the page there is a drop down menu. I want to select an option from the drop down. Is it possible to do in QT? Please help. -- Thanks & Regards Sujan ___ Interest mailing list Interest@qt-project.org http:

Re: [Interest] Terminating a QThread

2013-06-21 Thread Etienne Sandré-Chardonnal
Sorry Mandeep, I didn't read your post first. Basically what I posted is similar. A mutex is a little bit overkill here, you could use an atomic variable if you want to be sure, but just a bool flag will be enough as it is always set atomically AFAIK 2013/6/21 Mandeep Sandhu > On Fri, Jun 21,

Re: [Interest] Terminating a QThread

2013-06-21 Thread Etienne Sandré-Chardonnal
The best is still not to terminate threads if not absolutely necessary. Even without an event loop, you can poll a flag that asks the thread to return from the run function. For instance: void RenderThread::run() { while(!stopRequested) { //Do some intensive calcul

Re: [Interest] Terminating a QThread

2013-06-21 Thread Mandeep Sandhu
On Fri, Jun 21, 2013 at 1:36 PM, francois cellier wrote: > Dear all, > > Even if I know that it can be dangerous to terminate a thread, I need to > do it for my application. > The function that run into the thread is like a long linear sequence of > code that has not been designed in a signal/slot

Re: [Interest] Qt5 +CLR -> linker error LNK2005 workaround

2013-06-21 Thread Franz Hirschbeck
Hello everyone, just wanted to let you know, that we have a small workaround here in the meantime. The problem is that the CLR linker does not detect that these instantiations are identical. To avoid this problem we replaced the "inline" instantiation with an explicit instantiation in exactl

[Interest] Terminating a QThread

2013-06-21 Thread francois cellier
Dear all, Even if I know that it can be dangerous to terminate a thread, I need to do it for my application. The function that run into the thread is like a long linear sequence of code that has not been designed in a signal/slot way. Moreover, in my thread, I need an eventloop as I use in it s