现在的位置: 首页 > 综合 > 正文

Qt:平台相关的代码写法

2018年06月06日 ⁄ 综合 ⁄ 共 425字 ⁄ 字号 评论关闭
#ifdef Q_OS_LINUX
#ifdef V4L
        rc = new V4L1VideoCaptureDevice;
#endif //V4L
#endif //Q_OS_LINUX
#ifdef Q_OS_WIN32
        rc = new CvVideoCaptureDevice;
#endif // Q_OS_WIN32
    } else {
        rc = new XvidVideoCaptureDevice( file );
    }
#ifndef Q_OS_MAC
    vboxLayout->setSpacing(6);
#endif
    vboxLayout->setMargin(11);
    storageLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
    storageLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
    storageLayout->setMargin(0);
#endif

抱歉!评论已关闭.