Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, October 2006
Getting Access to Native Window


Message 1 in thread

I noticed that the winId() method is missing from the QWidget class in  
qt-jambi.  Is there some way to get the native window handle?

-- 
 [ signature omitted ] 

Message 2 in thread

Percy Wegmann wrote:
> I noticed that the winId() method is missing from the QWidget class in  
> qt-jambi.  Is there some way to get the native window handle?

Not directly right now... I'll mark it down as a feature request.

In the mean time the easisest thing you can do is to create a class like 
this:

class HandleAccessor
{
public:
     static qint64 handle(QWidget *widget) {
         return (qint64) widget->winId();
     }
};


If you map this class to java using the generator, you'll have your handle.

I hope this helps.

-
Gunnar


Message 3 in thread

Neat workaround.  I'll give that a try.

Thank You,
Percy Wegmann

On Mon, 16 Oct 2006 03:21:58 -0500, Gunnar Sletta <gunnar@xxxxxxxxxxxxx>  
wrote:

> Percy Wegmann wrote:
>> I noticed that the winId() method is missing from the QWidget class in   
>> qt-jambi.  Is there some way to get the native window handle?
>
> Not directly right now... I'll mark it down as a feature request.
>
> In the mean time the easisest thing you can do is to create a class like  
> this:
>
> class HandleAccessor
> {
> public:
>      static qint64 handle(QWidget *widget) {
>          return (qint64) widget->winId();
>      }
> };
>
>
> If you map this class to java using the generator, you'll have your  
> handle.
>
> I hope this helps.
>
> -
> Gunnar



-- 
 [ signature omitted ]