[Qt-interest] How to catch event in main-app from non-Qt thread ?

Velusamy, Baskar Baskar.Velusamy at chevron.com
Thu Apr 16 04:50:45 CEST 2009


 

Hi,

       I am trying to catch event from non-QT thread in my main
application, but some how it is not working..  below I have outlined my
code.. Please let me know anyting I am doing wrong...

 

Thanks in advance..

 

Baskar

 

 

main function

==================

int main(int argc, char **argv)

{

    QApplication app(argc, argv);

    qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));

 

    IXBuilder widget(argc, argv);

      //app.setMainWidget(&widget);

    widget.show();

    return app.exec();

}

 

 

Re-implemented my custom event...in main app 

==========================================

 

void IXBuilder::customEvent(QEvent *event)

{

      cout<<"event called";

} 

 

 

Posting event from non-qt thread.

==================================

 

QApplication::postEvent( qApp, new QEvent(QEvent::User));


________________________________

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Donal O'Connor
Sent: Wednesday, April 15, 2009 5:21 PM
To: qtInterest
Subject: Re: [Qt-interest] upgrading from Qt 4.3.4 to Qt 4.5.0


You can specify where the libraries will go by supplying the -prefix
option in the configure utilitiy,

./configure -prefix /usr/local/qt4

I would remove the current one first tho.

Donal


On Wed, Apr 15, 2009 at 4:28 PM, Dmitry Baryshev
<ksquirrel.iv at gmail.com> wrote:


	2009/4/15 Keshava Krishna <keshavkrishna88 at gmail.com>:
	
	> Hi,
	> I am using ubuntu 8.04 and Qt 4.3.4 (which i installed with
the help of
	> synaptic package manager)..
	> now i want to upgrade to Qt 4.5.0,
	> i have downloaded qt-x11-opensource-src-4.5.0.tar from
official Qt website
	> and i have followed the instructions in the INSTALL file...
	> but there was a problem, the new Qt4.5.0 libraries are copied
in some other
	> folder..
	> can anyone suggest me way to install QT 4.5.0 so that all
libraries get
	> copied in the same way as Qt 4.3.4( i.e in /usr/include/Qt4)
	> 'm new to Linux and Qt please help me out...
	> --
	> Regards,
	> Keshava.
	>
	
	> _______________________________________________
	> Qt-interest mailing list
	> Qt-interest at trolltech.com
	> http://lists.trolltech.com/mailman/listinfo/qt-interest
	>
	>
	
	You can upgrade to Jaunty, it has Qt 4.5.0 by default. If you
don't
	won't to upgrade, you can download sources and patch from
	http://packages.ubuntu.com/jaunty/libqt4-core, unpack, apply
patch and
	build package with "dpkg-buildpackage -b -rfakeroot".
	"dpkg-buildpackage" will tell you if you miss any required
packages
	for build.
	
	--
	Regards, Krasu.
	
	_______________________________________________
	Qt-interest mailing list
	Qt-interest at trolltech.com
	http://lists.trolltech.com/mailman/listinfo/qt-interest
	


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


More information about the Qt-interest-old mailing list