Mixing Qt and Boost(混合 Qt 和 Boost)
问题描述
我正在考虑使用 Qt 4 框架(需要跨平台 GUI)在 C++ 中启动一个项目.我从朋友和网上听说过关于 Boost 库的好消息.我已经开始阅读两者,并想在深入了解之前提出一个粗略的问题:这两个开发系统"是否相互排斥?
I'm looking at starting a project in C++ using the Qt 4 framework (a cross-platform GUI is required). I've heard great things about the Boost libraries from friends and online. I've started reading up on both and wanted to ask a cursory question before I got too deep: Are these two development "systems" mutually exclusive?
我最初的搜索和阅读显示信号处理、自定义构建系统和其他低级原语存在一些重叠.
My initial searching and reading shows some overlap in the signal handling, custom build systems, and other low-level primitives.
在同一个项目中使用它们是否有意义?
Does it make sense to use them both in the same project?
推荐答案
是的,这很有意义.我通常更喜欢在可能的情况下使用 boost/stdlib 函数而不是它们的 Qt 替代方案.
Yes it makes perfect sense. I would generally prefer using the boost/stdlib functions where possible rather than their Qt alternatives.
它使代码更容易移植到下一个框架.
它使新的非 Qt 程序员更容易上手.
Boost 有一些很棒的功能,并且一直在增加.
It makes the code easier to port to the next framework.
It makes is easier for new non-Qt programmers to get upto speed.
Boost has some great functionality and is getting more all the time.
注意:传入/传出小部件的字符串可能是主要的例外——在 GUI 中,我会使用 Qt 字符串来保存无处不在的令人困惑的转换.
note: strings to/from widgets are probably the main exception - inside the GUI I would use Qt strings to save confusing casts everywhere.
这篇关于混合 Qt 和 Boost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:混合 Qt 和 Boost
基础教程推荐
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- CString 到 char* 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 初始化列表*参数*评估顺序 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
