混合 Qt 和 Boost

Mixing Qt and Boost(混合 Qt 和 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

基础教程推荐