将Qt与Wt一起使用 [英] Using Wt with Qt

查看:267
本文介绍了将Qt与Wt一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个用于控制某些机器和可视化传感器数据的Web应用程序的项目.它部署在运行自定义linux发行版的单板计算机上.我们有一个基于独立Qt应用程序的项目早期版本中的大量现有代码库.借助新软件,我们正朝着使用 Wt 的基于Web的界面迈进.

I'm working on a project to develop a web application for controlling some machinery and visualising sensor data. It is deployed on a single board computer running a custom linux distro. We have a large existing code base from a previous version of the project that is based on a standalone Qt app. With the new software we are moving towards a web based interface using Wt.

目前,我们正在尝试重用与某些系统服务接口的Qt代码,同时托管并与新的Wt GUI进行接口. Qt应用程序和Wt应用程序在不同的线程上启动. Wt在主线程上,而Qt在另一个线程上.使用c ++线程"库可以做到这一点.

At the moment we are trying to re-use the Qt code which interfaces with some system services, while hosting and interfacing with the new Wt GUI. The Qt app and Wt app are launched on different threads. Wt on the main thread and Qt on another thread. Using the c++ "thread" library to do so.

我在Qt方面的经验很少,而且似乎很少有关于将两者集成的文档,有谁知道Wt和Qt之间可能普遍发生或针对此情况的任何冲突.

I have very little experience in Qt and there seems to be very little existing documentation on integrating the two, does anyone know of any conflicts that may occur between Wt and Qt in general, or specific to this situation.

到目前为止,它似乎运行正常且运行良好,但我只是想涵盖所有基础知识.我正在寻找有关这种情况的意见或想法,以找出在同一系统上运行这两个应用程序的任何弱点.

So far it seems to be running ok and playing nicely, but I am simply trying to cover all my bases. I am looking for comments or thoughts on the situation that may identify any weak points in running the 2 apps on the same system.

在此先感谢您的帮助.

推荐答案

Wt在示例目录wtwithqt中包含一个示例,该示例说明了如何使Wt和Qt协同工作.它包括一种使Wt适应Qt非常具体的线程模型的特定策略的实现.

Wt includes an example in the examples directory, wtwithqt, which explains how Wt and Qt can be made to work together. It includes an implemenation of one particular strategy to make Wt fit in Qt's quite specific threadming model.

这篇关于将Qt与Wt一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆