[Qt-interest] 2 thread

SALOMEHER at terra.es SALOMEHER at terra.es
Thu May 20 12:47:42 CEST 2010


 
  Normal
  0
  
  
  
  
  
  
  
  
  21
  
  
  false
  false
  false
  
  ES
  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4
  
   
   
   
   
   
   
   
   
   
   
   
  

 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 




 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Tabla normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin-top:auto;
	mso-para-margin-right:0cm;
	mso-para-margin-bottom:auto;
	mso-para-margin-left:0cm;
	text-align:justify;
	line-height:200%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;}



Hello, I have
created a class (Mythread) of the QThread type. This class is called from
another QWidget type in a loop.

 

Mythread thread1;

MyThread thread2;

int j=0;

thread1.inic1(j, …);

thread1.start();

j++;

thread2.inic2(j, …);

thread2.start();

while (j < NRD)

{

     if((!thread1.isRunning()) &amp;&amp; (!thread2.isRunning()))
{

           …. // operations with the
information obtained of thread1

           j++;

           thread1.inic2(j, …);

           thread1.start();

           ….   // Operations with the information obtained of
thread2

           j++;

           thread2.inic2(j, …);

           thread2.start();

     }

}

 

More
or less that makes my application but it does not end well, I get the following
error: QObject::killTimers: timers cannot be stopped from another thread

 

What
is the problem?

Thank
you.





Greetings.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100520/d30f1e62/attachment.html 


More information about the Qt-interest-old mailing list