[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: Access to QLibrary pointers
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2023-08-30 21:06:43
Message-ID: 636e2b68012cefc1e3b4c19c627eb3b2 () riverbankcomputing ! com
[Download RAW message or body]
On 30/08/2023 20:50, Maurizio Berti wrote:
> Some time ago I posted on StackOverflow (
> https://stackoverflow.com/a/60895316/2001654 ) a "hacky" way to use the
> qt_blurImage function that is internally used by Qt for graphics
> effects
> and other things.
>
> It basically uses ctypes to access the function in the QtWidgets
> library,
> the implementation is a bit sketchy, but it works.
>
> While checking it again, as a user had problems accessing the function
> in
> Qt6, I stumbled upon the QLibrary class, and I was wondering if I could
> use
> it instead.
>
> Unfortunately, while the library loads and resolve() properly gets
> access
> to the function, it returns a voidptr which obviously is not callable.
>
> I have limited experience with SIP (I only used it on very few
> occasions
> and with simple castings), so maybe the solution is quite simple, but I
> really don't know how to make that pointer to a callable function - or
> even
> if it's possible.
>
> Also, I assume that the arguments would still be ctypes, right? If
> that's
> the case, there would be no real benefit in using QLibrary, I suppose.
>
> Still, it would be interesting to know if it could be used and how.
There is no support for calling a voidptr. You can convert it to an
integer which may be used by something else.
Phil
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic