How to call Qt functions from Omniorb thread?
szyk100
szyk100 at o2.pl
Tue Nov 17 20:37:15 GMT 2015
Hi
[[ design ]]
I have Corba application: server (command line) and client (Qt GUI). This is chat program. Design is similar to Tic Tac Toe example. Main difference is that my application is pure C++ contrary to pure Python TicTacToe example. This is typical Corba application except UserImp class is client side implemented.
[[ how it works ]]
I create object of UserImp class (descendant from TCzat::User and QObject), register it in server side RoomImp factory class and it return RoomController to the client. When it register new UserImp object RoomImp factory call addUser for every UserImp (new object include).
addUser emits signal sigAddUser(). But it is not emited.
[[ problem ]]
The signal UserImp::sigAddUser is connected to WinMainC::addUser slot. But when the signal sigAddUser is emited addUser is never called. I dig Internet for a while. And I discovered that object is belong to the thread where it is created. I create UserImp object in main (GUI) thread. And I suspect that Omniorb calls UserImp::addUser (which emits signal) from it's own thread. So signal can not be emited.
[[ what I want ]]
I want call (somehow) from server side object RoomImp client side objects UserImp and update GUI in thread safe way. I try do this by emmiting signal but it don't works. So maybe there is other way around?
I think that direct call from UserImp to WinMainC is dangerous. So I don't even try this.
thanks and please help me
Szyk Cech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20151117/d503a665/attachment.html>
More information about the omniORB-list
mailing list