Qt的是否有一个C接口? [英] Does Qt have a C interface?

查看:128
本文介绍了Qt的是否有一个C接口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上找到了答案相互矛盾的 - 有些人说有,有的说没有。我无法找到的官方Qt文档中的任何细节无论是。因此,没有Qt的有C绑定与否?

I've found conflicting answers on the web - some say it does, some say it doesn't. I was unable to find any details in the official Qt documentation either. So does Qt have C bindings or not?

推荐答案

简短的回答:没有

如果你需要对C一个COM prehensive GUI工具,你可以使用GTK +。

If you need a comprehensive GUI toolkit for C, you can use GTK+.

要使用Qt,您的必须的有一个C ++编译器。不过,这并不意味着你的应用程序逻辑不能用C写的,与C编译器编译并仔细连接到C ++的一部分(使用Qt的GUI)。此应用程序的逻辑是可以通用的,可链接到其他可执行文件(纯C,混合的C / C ++等),这一切都取决于你所需要的。

To use Qt, you must have a C++ compiler. But it doesn't mean that your "application logic" can't be written in C, compiled with a C compiler and carefully linked to the C++ part (the GUI with Qt). This application logic can be generic, linkable into other executables (pure-C, mixed C/C++, etc.) It all depends on what you need.

Qt是伟大的C ++,虽然,这是一个很好的理由使用C ++为一个特定的项目,即使你仍想保留的部分用C来决定。

Qt is great for C++, though, and it's a good reason to decide using C++ for a particular project, even if you still want to keep parts in C.

这篇关于Qt的是否有一个C接口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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