简体   繁体   中英

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?

尝试使用utf16 ()方法-像WebShot_Open (WebShotHandle, url.utf16 ())

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM