您使用 Qt 吗?为什么使用它?
优点。 和缺点? 你用了多久? 占碑呢?
Pros. and cons? how long do you use it? What about jambi?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
优点。 和缺点? 你用了多久? 占碑呢?
Pros. and cons? how long do you use it? What about jambi?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(8)
我已经使用 Qt 进行商业开发好几年了,并且对它非常满意。
Qt 的优点之一是它提供了大量的库以及 GUI 内容(例如 XML 解析、线程、网络),所有这些都具有一致的风格并且都是多平台的。 这意味着我们很少需要使用其他库,尽管我们确实在某些事情上使用了 boost。
对我们来说另一个非常重要的因素是国际化。 在以前基于 MFC 的应用程序中,我们必须为我们支持的两种语言维护 2 个本地化版本。 在我们基于 Qt 的应用程序中,我们只有一个版本。
非常有价值的一件事是对源代码的访问,尽管这肯定不是 Qt 所独有的。 在某些情况下,检查 Qt 源代码的能力可以解释一些奇怪的行为或给出如何实现某些目标的线索。
我们在 Qt 中发现了一些错误,其中一些在向 Trolltech 报告后已得到修复。 在其他情况下,他们提出了解决方法。 这些都相当模糊,并没有对我们的发展产生重大影响。
Qt 的主要缺点之一是缺乏用于商业应用程序的第三方库。 然而,Qt 相当完整,因此对我们来说这并不是一个大问题,尽管这取决于您正在开发的应用程序类型。
我也没用过占碑。
I have been using Qt for several years now for commercial development and have been very happy with it.
One of the nice things with Qt is that it provides a large set of libraries as well as the GUI stuff (eg XML parsing, threads, networking), all in a consistent style and all multi-platform. This means we rarely need to use other libraries, though we do use boost for some things.
Another very important factor for us was internationalization. In a previous, MFC based application we had to maintain 2 localized versions, for the two languages we support. In our Qt based app we just have the one version.
One thing that has been very valuable is the access to the source, although e this is certainly not unique to Qt. On several occasions the ability to check the Qt source has explained some strange behaviour or given a clue how to achieve something.
We have found a few bugs in Qt, some of which have been fixed after reporting to Trolltech. In other cases they have suggested a work around. These have all been fairly obscure and not had a major impact on our development.
One of the main downsides to Qt would be the lack of 3rd party libraries for use in commercial applications. However, Qt is fairly complete so for us it has not been a big problem, though that will depend on which type of application you are developing.
I have not used Jambi either.
在七年的时间里,我在多个平台上用 C++ 完成的几个项目中使用了 Qt。 我认为它工作得很好,而且对我来说在 Mac 上开发一个像样的 GUI 应用程序肯定比费力地学习一种我当时不知道的语言 (Objective-C) 更快。
我认为信号/槽机制有点古怪,但并不可怕。 一旦你使用它一段时间,它就不再是一个障碍。 连接的东西很容易搞砸(或者至少是这样),检查这些东西的回报总是好的,因为你的应用程序会愉快地运行,不会告诉你它不起作用。
我从来没有用过占比。
I've used Qt on a couple of projects I did in c++ on several platforms over a period of seven years. I think it works pretty well and definitely was quicker for me to develop a decent GUI app on the Mac than plodding through a language I didn't know (Objective-C) at the time.
I think the signal/slot mechanism is a bit funky but isn't horrible. Once you're use it for a bit, it's not a show stopper. The connection stuff is easy to bungle up (or at least it was) and it's always good to check the return on those because your app will go merrily on its way and not tell you that it didn't work.
I've never used jambi.
以下是我使用 Qt 的一些优点和缺点:
优点:
跨平台
我知道这个总是被使用,但是在使用 Qt 在 Windows 和 Linux 之间来回切换之后,令人惊讶的是我只需要做很少的事情就可以启动和运行。 我认为这得益于我只将 Vim 与 Qt Designer 结合使用。
QMake
这是我最喜欢 Qt 的方面之一。 在使用 wxWidgets、FLTK 等之后,我厌倦了摆弄不同的构建系统,并且我不想手动创建我的 makefile。 我目前在除 Qt 以外的任何东西上使用 CMake,但我想我正在慢慢地将 Qt 转移到 CMake。 然而,使用 QMake 非常容易。
QTestLib
我查看了其他几个 C++ 单元测试框架,当我使用 QTestLib 创建测试时,它感觉与 NUnit(C#) 非常相似,并且在几分钟内我就通过了几个测试。 我还注意到,创建自己的持续集成环境非常容易。
在生产力方面最接近 Java 和 .Net
我听到/读到的关于 C++ 的最重要的一句话是,“我可以使用 Java 或 .Net 提高工作效率”。 根据个人经验,我可以在 Eclipse 或 Visual Studio 加载之前使用 Vim 和 Qt Designer 获得在 Qt 中运行的应用程序的原型。 我还在 Qt 中获得了一组与 .Net 或 Java 中非常相似的库,如果没有,我可以利用现有的 C++ 代码。
缺点:
价格
这是我目前能想到的最大因素。 然而,每一分钱都是值得的,嗯,如果我知道在不打电话给销售代表的情况下我必须节省多少美分的话。 我在他们有小型企业折扣的那天购买了许可证,当时这是值得的,我会支付三倍的钱,我认为这就是当前的价格。
通过商业许可在任何地方进行开发
我希望能够在任何平台上进行开发,但可以为另一个平台进行构建和销售。 例如,如果您只有 Windows 商业许可证,则在 Linux 上进行开发,然后在 Windows 上构建和部署。 据我所知,您只能在您拥有许可证的平台上开发和构建商业应用程序。
供应商锁定
好吧,这更多的是个人骗局。 我不喜欢与特定供应商联系在一起,因为我会被公司方向和产品方向所左右。 TrollTech被诺基亚收购了,我不知道这是好还是坏,但是这么大的公司可以做坏事。
我想我现在已经完成了:)。 哦,我还没有使用过 Jambi,但我真的很感兴趣做几个原型项目,以了解使用 C++ 开发的插件与 Jambi 是多么容易。 特别是使用 Jambi 作为带有 C++ 插件的 Web 界面。
老实说,我没有读过太多相关内容,所以这可能是不可能的,或者非常容易。
Here are some of my Pros and Cons with Qt:
Pros:
Cross-platform
I know this one is always used, but after going back and forth between Windows and Linux with Qt, it's amazing how little I have to do to get up and running. I think this is helped by the fact I only use Vim with Qt Designer.
QMake
This is one of my favorite aspects of Qt. After doing work in wxWidgets, FLTK, etc., I get so tired of messing around with different build systems and I don't want to manually create my makefiles. I currently use CMake on anything other than Qt right now, but I think I'm slowly moving even Qt over to CMake. However it's just so easy to get going with QMake.
QTestLib
I looked at a couple other C++ unit testing frameworks and when I created my tests using QTestLib, it felt very similar to NUnit(C#) and within minutes I had several passing tests. I also noticed that it would be very easy to create my own continuous integration environment.
Closest to Java and .Net in productivity
The biggest thing I hear/read people say about C++ is, "I can be more productive with Java or .Net". From personal experience I can get a prototype of an application running in Qt using Vim and Qt Designer, before Eclipse or Visual Studio even load. I also get a very similar set of libraries in Qt that I have in .Net or Java and if it's not there I can leverage the existing C++ code out there.
Cons:
Price
This is the biggest factor I can think of right now. However, the cost is worth every cent, um if I knew how many cents I had to save up without making a call to a sales rep. I purchased a license back in the day when they had their small business discount and it was worth it then, I would've paid three times as much and I think that's the current price.
Develop anywhere with commercial license
I would love to be able to develop on any platform, but build and sell for another platform. For example, develop on Linux, then build and deploy on Windows if you just have the Windows commercial license. From what I know, you can only develop and build a commercial application on the platform you have a license for.
Vendor lock-in
Well sort of, this is more of a personal con. I don't like being tied to a specific vendor because I get side tracked by the company direction and product direction. TrollTech was purchased by Nokia, is this good or bad I don't know, but a company that size can do evil things.
I think I'm done for now :). Oh, I haven't used Jambi but I'm really interested in doing a couple prototype projects to find out how easy it is to use a plugin developed in C++ with Jambi. Especially using Jambi as a web interface with C++ plugins.
To be honest I haven't read much on it, so it may be impossible or very easy.
我在之前的工作中使用过Qt。 在此之前的几年里,我对 Qt 的接触非常短暂,所以我几乎是一个 Qt 新手。
当我开始时,我被告知选择我的语言和环境,但跨平台支持是可取的。 我尝试了 Qt 和 Java,甚至还尝试了 C#。 我给自己两天时间来评估每个选项。
也许我对自己作为一名 C++ 开发人员的历史略有偏见,但在每个选项上花费了时间之后,Qt 是唯一一个在没有很长的学习曲线的情况下显示出有用的提示的选项。
Qt 提供的文档和示例应用程序使经验丰富的开发人员(但 Qt 初学者)可以非常轻松地快速上手并运行。 在试用期结束时,我已经完成了最终应用程序的 UI 原型/模型。 使用 Java/Eclipse、Java/SunStudio 和 C#/VS.net,当时我很难处理任何重要的事情。
信号/槽需要一些时间来适应,但这还不错,我编写了一些简单的包装器来在连接无法阻止愚蠢的拼写错误停止应用程序时进行断言。 从工作中。
我喜欢的另一件事是 Qt 几乎拥有我需要的一切。 你能想到的——存储、网络、GUI、线程、容器——Qt 有一个类来处理它们。 恕我直言,这很重要,因为混合库有时会导致问题。
拥有 Qt 的源代码是一个很大的优势,这只是出于兴趣,而且它还允许我使用我选择的编译器和设置来编译 Qt,包括在开发过程中使用的调试版本。
我还发现 Trolltech 的支持相当好。 我在 Qt 上提出了几个错误,其中一个在我仍在从事该项目时已修复并发布(仅工作了 6 个月)。
我能记得的唯一缺点是调试 Qt 对象(使用 VS)的困难 - VS 有一个 Qt 插件可以检查 Qt 对象,但我使用的是 VS 的免费版本,插件不适用于它。 但这不是 Qt 的错。
我没有使用过jambi,所以无法发表评论。
I used Qt in a previous job. I'd only had the absolute briefest of contact with Qt several years prior to that, so I was pretty much a Qt newb.
When I started I was told to choose my language and environment, but cross-platform support was desirable. I tried Qt and Java, and even gave C# a go just for the heck of it. I gave myself two days to evaluate each option.
Maybe I was slightly biased with my history as a C++ developer, but after spending time on each option Qt was the only one that showed any hints at being useful without a long learning curve.
The documentation provided with Qt and the example applications made it very easy for an experienced developer but Qt beginner to get up and running very quickly. I had UI prototype/mockups of the end application done by the end of my trial period. With Java/Eclipse, Java/SunStudio and C#/VS.net I had trouble getting anything nontrivial happening in that time.
Signals/slots took some getting used to, but it wasn't too bad, and I wrote some simple wrappers to assert when connections failed to stop silly typos from stopping the app. from working.
The other thing I liked is that Qt had almost everything I needed. You name it - storage, networking, GUI, threading, containers - Qt has a class to deal with it. Which IMHO is important because mixing libraries can sometimes cause problems.
Having the source code to Qt was a big plus, one for just plain interest's sake, but also it allowed me to compile Qt using the compiler and settings of my choosing, including a debug version for use during development.
I also found Trolltech's support to be fairly good. I raised a couple of bugs on Qt, one of which was fixed and released whilst I was still working on the project (only a 6 month job).
The only negative I can recall was the difficulty in debugging Qt objects (using VS) - there is a Qt plugin for VS that can examine Qt objects but I was using the free version of VS and plugins don't work for it. But that wasn't Qt's fault.
I haven't used jambi so can't comment.
在 C++ 上,您唯一的其他选择是 MFC 和 wxWidgets。
QT/wxWidgets很大程度上是个人喜好。 我确实认为 QT 是一个干净的设计和良好的文档。
如果你不使用 GPL,QT 的成本大约是开发人员一个月的工资。
On C++ your only other alternatives are MFC and wxWidgets.
QT / wxWidgets is largely a personal preference. I do think QT is a clean design with good documentation.
QT costs about one month of developer salary if you aren't using it for GPL.
我使用 Qt 已有两年多了。
我喜欢 Qt 的一点是:
MFC)、Qt Designer
我强烈推荐 Qt 开发者日。 如果您有机会参加,那就参加吧! 那里有很多精彩且非常有趣的演讲。
I have been using Qt for over two years now.
Things I like on Qt are:
MFC), Qt Designer
I can highly recommend the Qt Developer Days. If you have a chance to take part, then do it! Lots of nice and very interesting talks there.
Qt 是一个非常好的库,但它具有昂贵的单机开发人员许可证,因此它并不总是对所有项目都有用。
Qt is a very nice library, but it has an expensive per-seat developer license, so it's not always useful for all projects.
但是,不要使用它...
Pro:
QT 有一个可选的 3 相布局,而 WX 目前只允许 2 相(我相信他们计划做 3 相,只是还没有实施)。
使用布局的更大问题之一是静态文本和换行。 WX 询问您的最小宽度/高度有多大以及屏幕的部分,QT 可以选择说出您想要多宽,如果您的 X 宽则需要多高。 这使您可以更好地表达页面的流程。
Don't use it, however...
Pro:
QT has an optional 3 phase layout, where as WX only allows for 2 currently (I believe they plan to do 3 phase, just have not worked it in yet).
One of the bigger problems with using layouts is static text and wrapping. WX asks how big is your min width/height and portions out the screen, QT has option to say how wide do you want, how high do you need to be if your X wide. This allows you to express the flow of a page much better.