Qt_QString和HTuple之间的转换

    //QString转HTuple
    QString qpath = "D:/game";
    std::string path = qpath.toStdString();
    HTuple hpath = path.c_str();
    qDebug()<<qpath;

    //HTuple转QString
    HTuple hpath = "D:/game";
    std::string path=hpath.S().Text();
    QString qpath = QString::fromStdString(path);

    //string转QString
    std::string path="D:/game";
    QString qpath = QString::fromStdString(path);

    //QString转string
    QString qpath = "D:/game";
    std::string path = qpath.toStdString();

cmake中的halcon环境配置:

set(HALCON_DIR "C:/Program Files/MVTec/HALCON-22.05-Progress")
message (">>> HALCON_DIR = ${HALCON_DIR}")
include_directories("${HALCON_DIR}/include")
include_directories("${HALCON_DIR}/include/halconcpp")
link_directories("${HALCON_DIR}/lib/x64-win64")

add_executable(Ceshi0903 main.cpp)
target_link_libraries(Ceshi0903 halconcpp.lib)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值