为什么使用QVector(Qt)而不是std :: vector [英] Why use QVector(Qt) instead of std::vector

查看:1416
本文介绍了为什么使用QVector(Qt)而不是std :: vector的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C ++和Qt的新手,但我非常擅长C#/ Java。

I'm very new to C++ and Qt, but I'm very good at C#/Java.

关键是我喜欢跨平台,与Qt混淆。是不是 std :: vector 已经跨平台,Qt不提供一个非交叉平台的东西呢?

The point is I like cross-platform, but I'm confuse with Qt. Isn't std::vector already cross-platform, doesn't Qt provide an equivalent to a non-crossplatform thing?

文件 QFile 有何不同?

链接会很好,谢谢:)

推荐答案

这篇文章好起来。它比较Qt模板库和标准模板库:

This article loooks good. It compares Qt Template Library with Standard Template Library:

  • QTL vs STL

希望你会发现很有趣,

Hope, you'll find it interesting seeing all the differences listed there in the article.

编辑:

这里是我感兴趣的:


我的意见是,QTL的最大的
优势是它有
相同的实现(包括
二进制兼容性)在Qt
支持的所有操作系统
上。一些STL
实现在性能方面可能低于par
,或者
可能缺少功能。一些
平台甚至没有STL!在
另一方面,STL更多的
可定制,并在其
整个头文件... 像我说的,
没有明确的胜利者

My opinion is that the biggest advantage of the QTL is that it has the same implementation (including binary compatibility) on all OSes supported by Qt. Some STL implementations might be below par when it comes to performance or they might be missing functionality. Some platforms don’t even have an STL! On the other hand, the STL is more customizable and is available in its entirety in header files… Like I said, there is no clear winner.

就像他说的,没有明确的胜利者。但仍然阅读文章使很多事情清楚。它更好地知道差异比去一个,而不知道另一个。

Like he said, no clear winner. But still reading the article makes lots of things clear. Its better to know the difference than going for one, without knowing the other.

这篇关于为什么使用QVector(Qt)而不是std :: vector的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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