yazwas
yazwas

Reputation: 111

Convert QString to uint16*

Good day

I'm using a 3rd party library with functions have this sort of signature

int32 WebShot_Open(intptr WebShotHandle, uint16 *Url);

in Visual Studio, I can call this function using the following code

WebShot_Open(WebShotHandle, L"http://www.stackoverflow.com/")

I want to use this function from within Qt, and I want to pass QString to the 2nd parameter.

QString url = "www.stackoverflow.com";
WebShot_Open(WebShotHandle, url);

How to do that?

Upvotes: 0

Views: 1304

Answers (1)

Predelnik
Predelnik

Reputation: 5246

Try to use utf16 () method - like WebShot_Open (WebShotHandle, url.utf16 ())

Upvotes: 1

Related Questions