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


基础教程推荐
- Windows Media Foundation 录制音频 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07