Why aren't more desktop apps written with Qt?
Ref http://programmers.stackexchange.com/questions/88685/why-arent-more-desktop-apps-written-with-qt
I don't really intend this to be a bashing answer, but these are the reasons I do not personally use Qt. There are plenty of good things to say about it -- namely that the API works most of the time, and that it does seamlessly bridge platforms. But I do not use Qt, because:
我真的不打算这是一个bashing 的答案,但这些都是我不亲自使用Qt的原因。说关于它有很多好东西 - 即该API大部分时间工作,其无缝桥接平台。但我不使用Qt的,因为:
In some cases, it just doesn't look like native programs look. Designing a single UI for all platforms inherently is not going to look right when moved from machine to machine, for various visual styling reasons. For example, on Mac machines, split bars are usually relatively thick, and buttons are small and rounded with icons. On Windows machines, split bars are typically narrow, and buttons are more textual, with more square designs. Just because you can write one UI for every platform does not mean that you should for most applications.
在某些情况下,它看起来并不像本地程序的外表。例如,在Mac机,拆分条通常比较厚,按钮都很小,使用圆交图标。在Windows计算机上,拆分条是典型的窄,按键上文本更多,更多的方形设计。你可以写一个UI为各种平台,并不意味着你适合大多数应用。
Qt is not a C++ library. It requires a separate compilation step, which makes the build process much more complicated when compared with most other libraries.
Qt是不是C ++库。它需要一个单独的编译步骤,当与其他大多数库相比,这使得构建过程复杂得多。
As a result of (2), C++ IDEs and tools can flag Qt expressions as errors, because they do not understand Qt's specifics. This almost forces use of QtCreator or a textual only editor like vim.
由于(2),C ++ IDE和工具可以标志Qt的表达式为错误,因为他们并不了解Qt的特点。这几乎是强制使用QtCreator或文本编辑器如vim。
Qt is a large amount of source, which must be present and preinstalled on any machine you use before compiling. This can make setting up a build environment much more tedious.
Qt有大量的源代码,必须存在,并预装在计算机上以便编译。这可以使建立一个构建环境更加繁琐。
It's available only under LGPL, which makes it difficult to use single-binary-deployment when one needs to release under a more restrictive or less restrictive license.
它只能根据LGPL,这使得它难以用单二进制部署
It produces extremely large compiled binaries when compared with similarly written "plain ol' native applications" (excepting of course applications written for KDE).
当与同样写有“纯醇'本机应用程序”(除了为KDE编写的课程申请)相比,它产生非常大的编译的二进制文件。
As people say, each tool fits to each problem and situation...
But if you're C++ programmer, Qt is your framework. No rival.
We develop a complex medical imaging commercial application, and Qt holds on.
正如有人说,每个工具适合于每个问题的情况...
但如果你是C ++程序员,Qt是你的框架。没有对手。
我们开发了一个复杂的医疗成像商业应用,使用Qt。
I don't say that the 'cons' that people say about it are false, but I have the feeling that they don't have tried Qt for a long time (its continously improving on each new version...) And, mostly all of the issues they comment are not a problem if you take care.
我不会说大家说的“弊”是假的,但我的感觉是,他们很长一段时间没有尝试过的Qt(其continously提高每个新版本...),并且大多其实他们的问题并不是问题。
UI platform inconsistency: only if you use the UI widgets 'as they are', with no customization or custom art.
Qt preprocessor overload: Only if you abuse of signal-slot mechanism, or QObject inheritance, when there is no really need.
By the way, We still write applications in C#.NET, and been doing it for a long time. So I think I have enouch perspective.
As I said, each tool for each situation,
but Qt is with no doubt a consistent and useful framework.
UI平台不一致性:只有当您直接使用UI部件,没有定制的额时候。
Qt的预处理过载:只有当你滥用信号插槽机制,或者QObject的继承。
顺便说一句,我们仍然在写C#.NET应用程序,并且已经做了很长一段时间。因此,我认为我有足够的视角。
正如我所说的,每一个工具,有适合他的情况,
但Qt是毫无疑问一致和有用的框架。
Of all the things I don't like about Qt, the fact that it doesn't play well with templates bugs me the most. You can't do this:
我最不喜欢Qt的是,它的模板有bug。你不可以这样做:
template < typename T >
struct templated_widget : QWidget
{
Q_OBJECT;
public signals:
void something_happened(T);
};
It also doesn't play well with the preprocessor. You can't do this:
预处理也处理的不好,你不能这样
#define CREATE_WIDGET(name,type) \
struct name ## _widget : QWidget \
{ \
Q_OBJECT; \
\
public signals: \
void something_happened(type); \
}
That, mixed with the fact that everything that responds to a signal has to be a Q_OBJECT, makes Qt hard to work in for a C++ programmer. People used to Java or Python style programming probably fair better actually.
再就是,每个需要相应信号的都需要时Q_OBJECT,使C ++程序员很难适应Qt。使用Java或Python编程风格可能感觉好一些。
I actually spent a lot of time and effort researching and devising a way to gain type safety back and connect a Qt signal to any functor object: http://crazyeddiecpp.blogspot.com/2011/01/quest-for-sane-signals-in-qt-step-1.html
我居然花了很多的时间和精力研究和一边找到一种方式能安全的链接qt信号到任意的functor比如
The kind of thing I want to do there is basic, everyday C++ development made next to impossible by the Qt moc...which itself is entirely unnecessary now days, if it ever actually was.
这种事情是基本的,载入Qt的MOC ...这本身现在是完全没有必要
Frankly though, I'm stuck with it because if you want to do automated UI testing, Qt is pretty much the only game in town short of MFC...which is so 1980 (it sucks working in that shit really hard). Some might say WX but it's got even more serious problems. GTKmm would have been my first choice but since it's all owner drawn and doesn't do accessibility...can't be driven by industry standard testing software. Qt is hard enough in that regard (barely works when you modify the accessibility plugin).
坦率地说,虽然,我坚持了下来,因为如果你想要做的自动化UI测试,Qt是几乎唯一的选择。而MFC的...这是1980年的东西。而WX有更严重的问题。 gtkmm的将是我的第一选择,但因为它是由一切所有者和没有做的无障碍...无法通过行业标准的测试软件来驱动。 Qt在这方面不错(你几乎没有修改插件的辅助工作)。
Why aren't more desktop apps written with Qt?的更多相关文章
- Why aren't more desktop apps written with Qt?(quora.com系列文章)
As far as I know and have understood in my experience with Qt, it's a very good and easy to learn li ...
- Electron Apps Are Bad, So Now You Can Create Desktop Apps With HTML5 + Golang
原文:https://www.phoronix.com/scan.php?page=news_item&px=HTML5-Golang-Desktop-Apps --------------- ...
- GitHub-Microsoft:DotNet3
ylbtech-GitHub-Microsoft:DotNet3 1.返回顶部 · mbmlbook Sample code for the Model-Based Machine Learning ...
- [2018.05].NET Core 3 and Support for Windows Desktop Applications
.NET Core 3 and Support for Windows Desktop Applications Richard 微软官网的内容...net 3.0 升级任务 任重道远 https:/ ...
- Arch Linux中通过AUR安装Redis Desktop Manager失败
笔者在安装Redis Desktop Manager时出现了Failed to connect to chromium.googlesource.com port 443: Connection ti ...
- DotNet 资源大全中文版(Awesome最新版)
Awesome系列的.Net资源整理.awesome-dotnet是由quozd发起和维护.内容包括:编译器.压缩.应用框架.应用模板.加密.数据库.反编译.IDE.日志.风格指南等. 算法与数据结构 ...
- A Complete List of .NET Open Source Developer Projects
http://scottge.net/2015/07/08/a-complete-list-of-net-open-source-developer-projects/?utm_source=tuic ...
- Essential controls for web app
AUTO-COMPLETE/AUTO-SUGGEST Auto-complete using Vaadin Offer auto-suggest or auto-complete to help yo ...
- Native code on Windows Phone 8(转)
Windows Phone 8 introduces the ability to use native code to implement Windows Phone. In this sectio ...
随机推荐
- Java基础复习
java语言的一个核心:jdk, java development kits---面向开发人员jre, java Runtime Environment---服务器上 java虚拟机---(以字节码为 ...
- Spring学习二
Spring的表达式语言 SpEL,使用方法是#{} SpEL的特性如下 使用Bean 的ID 来引用Bean : 调用方法和访问对象的属性: 对值进行算术.关系和逻辑运算: 正则表达式匹配: 集合操 ...
- matlab xml文件交互
xml文件以文档对象模型表示,简称DOM(Document Object Model).在Matlab中,使用xmlread读取xml文件成DOM节点,对xml文件的操作转化成对DOM节点的操作,使用 ...
- leetcode56:合并区间
给出一个区间的集合,请合并所有重叠的区间.(解题思想来源于:https://blog.csdn.net/qq_34364995/article/details/80788049 ) 示例 1: 输入: ...
- os与操作系统进行交互,sys解释器相关,random随机数,shutil解压和压缩
1.os 与操作系统相关 对文件的处理 对路径的处理 import os#主要用于与操作系统进行交互 掌握: print(os.makedirs('a/b/c'))#创建目录 可用递归创建 print ...
- ChinaCock界面控件介绍-CCLoadingIndicator
这是一个显示等待状态的控件,当在线程中执行一个稍长时间的任务,需要显示一个等待过程,免得让用户不知app在做什么?避免用户寂寞. 先看看这个控件的属性说明: BackgroundTransparenc ...
- python flask 小项目
0 开始之前 网上看了很多教程,都不是很满意,因此自己写一个大型教程,从入门到做出一个比较完整的博客.此次教程不是直接把整个博客直接代码整理出来然后运行一遍就完事,我会从flask的各个模块讲起.所以 ...
- 2019-02-28-day001-python介绍
今日内容大纲: 01 cpu 内存 硬盘 操作系统 CPU:中央处理器,相当于人大脑.---------飞机 内存:临时存储数据. 8g,16g,-----------高铁 1,成本高. 2,断电即消 ...
- Symbol -- JavaScript 语言的第七种数据类型
ES5 的对象属性名都是字符串,这容易造成属性名的冲突.比如,你使用了一个他人提供的对象,但又想为这个对象添加新的方法(mixin 模式),新方法的名字就有可能与现有方法产生冲突.如果有一种机制,保证 ...
- 【leetcode】27-RemoveElement
problem RemoveElement class Solution { public: int removeElement(vector<int>& nums, int va ...