简体   繁体   English

QT是我的跨平台应用程序的正确解决方案吗?

[英]Is QT the right solution for my cross-platform application?

My App is supposed to run on both Mac and PC. 我的应用程序应该在Mac和PC上运行。 It needs to access the local file system and manipulate it. 它需要访问本地文件系统并对其进行操作。 I also need to be able to resize images and create watermarked images as well as thumbnails. 我还需要能够调整图像大小并创建水印图像和缩略图。 It's important for my user interfaces to look as similar as possible on both platforms. 对于我的用户界面来说,在两个平台上看起来尽可能相似是很重要的。

Therefore I've been looking at QT which seems to be really up to date but I'm not very familiar with C++. 因此我一直在看QT,这似乎是最新的,但我对C ++并不是很熟悉。 I noticed that QT has support for the Webkit engine and wonder if my application UI can be written in HTML and be controlled using C++? 我注意到QT支持Webkit引擎,并想知道我的应用程序UI是否可以用HTML编写并使用C ++进行控制?

has anyone done this before? 以前有人这样做过吗? Any pros and cons are really appreciated. 任何利弊都非常感激。

Use Qt 使用Qt

Qt has a strong user community and easy-to-use documentation. Qt拥有强大的用户社区和易于使用的文档。 All of the platform-specific code is packaged up into C++ clases (QImage, QFile, etc.). 所有特定于平台的代码都打包成C ++ clases(QImage,QFile等)。

Don't Use HTML for a Qt GUI 不要将HTML用于Qt GUI

Caveat: If you plan on using an HTML interface I don't know if Qt is really a good solution. 警告:如果您计划使用HTML界面,我不知道Qt是否真的是一个很好的解决方案。 The default UI for Qt is XML-based (at design-time! - at run-time it uses the native platform GUI). Qt的默认UI是基于XML的(在设计时! - 在运行时它使用本机平台GUI)。

I haven't personally used WebKit to implement any user interfaces with Qt and that is not the intended design. 我没有亲自使用WebKit来实现Qt的任何用户界面,这不是预期的设计。 Usually you'll invoke WebKit to display an embedded web page or help file. 通常,您将调用WebKit来显示嵌入式网页或帮助文件。

Use QML for an HTML-Like Interface in Qt 在Qt中使用QML作为类似HTML的接口

As pointed out by gvd below, if you want to design your interface using HTML-like technology, then you will want to use QML. 正如下面的gvd所指出的,如果您想使用类似HTML的技术设计界面,那么您将需要使用QML。

Sources: 资料来源:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM