如何制作 Linux C++ 图形用户界面应用程序

发布于 2024-07-15 06:29:48 字数 1539 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

不乱于心 2024-07-22 06:29:48

最简单的方法是使用 GUI GUI 构建器。

GTK 的 Glade

用于 QT 的 QT 设计器

wxDesignerwxFormBuilder 用于 wxWidgets

更新:我应该提到这些输出 C++ 等等?

The easiest way is to use an GUI GUI builder.

Glade for GTK.

QT Designer for QT.

wxDesigner and wxFormBuilder for wxWidgets.

Update: I should mention that these output C++ among many others?

江南烟雨〆相思醉 2024-07-22 06:29:48

我个人更喜欢 QT,因为我更喜欢使用信号/槽机制,并且发现使用它可以轻松快速地开发应用程序。 其他一些选择是 wxWidgets 和 GTK+。

I personally prefer QT as I prefer working with the signal/slots mechanism and just find it easy to develop applications quickly with it. Some of your other options would be wxWidgets and GTK+.

夜雨飘雪 2024-07-22 06:29:48

gtkmm 是与 gtk 的 C++ 绑定,它应该可以正常工作

gtkmm is the c++ binding to gtk, it should work fine

墨小沫ゞ 2024-07-22 06:29:48

需要澄清一下到目前为止提到的工具包(GTK+、QT 和 wxWidgets)

GTK+ 是 GNOME 使用的工具包

QT 是 KDE 使用的工具包

wxWidget 旨在成为那些(和其他)工具包之上的抽象,以减少桌面环境的特定性。

另一个值得一看的工具包是 EFL 使用的工具包E17,虽然这个桌面环境的缓慢开发速度可能会让你失望,但我听说它的设计不错。 请注意,Enlightenment 项目中的一些组件(例如 imlib2)已被其他项目使用多年。

Just to be clear about the toolkits mentioned so far (GTK+,QT and wxWidgets)

GTK+ is the toolkit used by GNOME

QT is the toolkit used by KDE

wxWidget aims to be an abstraction above those (and others) to be less desktop environment specific.

Another toolkit worh takeing a peek at is EFL the toolkit used by E17, although the glacier development speed of this desktop environment may put you off, I hear nice things about it's design. Note that some components from the Enlightenment project such as imlib2 has been used for years by other projects.

幼儿园老大 2024-07-22 06:29:48

尝试一下 QT,它可以在 Ubuntu 上运行,并且背后有很多开发工具和文档。

例如教程,或另一个教程 或另一个 教程

Try QT, it will work on Ubuntu, and has a lot of development tools and documentation behind it.

eg a tutorial, or another tutorial or yet another tutorial

不顾 2024-07-22 06:29:48

我建议Juce。 它优雅、跨平台、快速、编写良好、几乎完全没有错误,并且与其运行的每个平台上的最后一个像素都相同。 已知错误的数量几乎总是零,因为当提交错误报告时,作者会放弃所有内容并修复它! The Register 不久前写了一篇关于它的文章,其中给出了对图书馆的概述相当好。

I suggest Juce. It's elegant, cross-platform, fast, well-written, almost totally bug-free and is identical to the last pixel on every platform it runs on. The number of known bugs is nearly always zero, since when a bug report is filed, the author drops everything and fixes it! The Register wrote an article about it a while ago which gives a rather good overview of the library.

嘿看小鸭子会跑 2024-07-22 06:29:48

最简单的方法肯定是Ultimate++。 我无法说出它有多棒,你只需尝试一下并被自己说服即可。 以下是完整申请:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

class HelloWorld : public TopWindow {
    MenuBar menu;
    StatusBar status;

    void FileMenu(Bar& bar);
    void MainMenu(Bar& bar);
    void About();

public:
    typedef HelloWorld CLASSNAME;

    HelloWorld();
};

void HelloWorld::About()
{
    PromptOK("{{1@5 [@9= This is the]::@2 [A5@0 Ultimate`+`+ Hello world sample}}");
}

void HelloWorld::FileMenu(Bar& bar)
{
    bar.Add("About..", THISBACK(About));
    bar.Separator();
    bar.Add("Exit", THISBACK(Close));
}

void HelloWorld::MainMenu(Bar& bar)
{
    menu.Add("File", THISBACK(FileMenu));
}

HelloWorld::HelloWorld()
{
    AddFrame(menu);
    AddFrame(status);
    menu.Set(THISBACK(MainMenu));
    status = "Welcome to the Ultimate++ !";
}

GUI_APP_MAIN
{
    SetLanguage(LNG_ENGLISH);
    HelloWorld().Run();
}

The easiest way is definitely Ultimate++. I can't tell how awesome it is, you just have to try it and be convinced by yourself. Following is a full application:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

class HelloWorld : public TopWindow {
    MenuBar menu;
    StatusBar status;

    void FileMenu(Bar& bar);
    void MainMenu(Bar& bar);
    void About();

public:
    typedef HelloWorld CLASSNAME;

    HelloWorld();
};

void HelloWorld::About()
{
    PromptOK("{{1@5 [@9= This is the]::@2 [A5@0 Ultimate`+`+ Hello world sample}}");
}

void HelloWorld::FileMenu(Bar& bar)
{
    bar.Add("About..", THISBACK(About));
    bar.Separator();
    bar.Add("Exit", THISBACK(Close));
}

void HelloWorld::MainMenu(Bar& bar)
{
    menu.Add("File", THISBACK(FileMenu));
}

HelloWorld::HelloWorld()
{
    AddFrame(menu);
    AddFrame(status);
    menu.Set(THISBACK(MainMenu));
    status = "Welcome to the Ultimate++ !";
}

GUI_APP_MAIN
{
    SetLanguage(LNG_ENGLISH);
    HelloWorld().Run();
}
黯然#的苍凉 2024-07-22 06:29:48

我个人可以保证 qt 的易用性,以及 Linux 特定开发的易用性。 一探究竟 :)

I can personally vouch for the ease of use of qt in general, as well as linux specific development. CHeck it out :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文