简体   繁体   English

在文本编辑器中创建 C++ 窗口窗体

[英]Creating C++ window forms in a text editor

Im begining a bold new step in application development, c++ and I have not been able to find any decent documentation on coding form windows in a text editor without gui/ides like visual studio.我开始在应用程序开发中迈出大胆的新步骤,C++,我无法在没有像 Visual Studio 这样的 gui/ide 的文本编辑器中找到任何关于编码表单窗口的像样文档。

Even though I have no Cpp background If I had a working example of a form window in pure .h(cpp header) and .cpp(cpp source) for a form window and a login form that uses mysql connector for user credential authentication, I will be able to use this as a starting point, or baseline for my first Cpp application.即使我没有 Cpp 背景如果我有一个纯 .h(cpp header) 和 .cpp(cpp source) 的表单窗口的工作示例,用于表单窗口和使用 mysql 连接器进行用户凭据身份验证的登录表单,我将能够使用它作为我的第一个 Cpp 应用程序的起点或基线。 My abilities with programming languages is similar to a pianist that doesn't read music but plays by ear, although I can learn to read music by listening to it if that makes sense.我在编程语言方面的能力类似于不阅读音乐而是靠耳朵演奏的钢琴家,尽管如果有意义的话,我可以通过听音乐来学习阅读音乐。 Basically if someone can point me in the right direction of creating form windows and login forms with mysql databases I can pickup from there without any help as I can learn from reading it.基本上,如果有人可以指出我使用 mysql 数据库创建表单窗口和登录表单的正确方向,我可以从那里获取而无需任何帮助,因为我可以从阅读中学习。 Many thanks in advance if you know what I'm after.如果你知道我在追求什么,非常感谢。

:) :)

Each operating system (Windows, Linux, Mac, etc.) has its on set of API's to create windows in C++.每个操作系统(Windows、Linux、Mac 等)都有一套 API 来在 C++ 中创建窗口。 However coding purely from C++ and using only those API's can bit a little bit tedious and time consuming so there are several frameworks that simplify using those API's.然而,完全从 C++ 编码并仅使用这些 API 可能有点乏味和耗时,因此有几个框架可以简化这些 API 的使用。

It can also make you application only compatible with one OS.它还可以使您的应用程序仅与一个操作系统兼容。

Visual Studio comes with MFC, that is only compatible with Windows, and not so great in my opinion. Visual Studio 带有 MFC,它只与 Windows 兼容,在我看来并不是那么好。

The best up to date, cross-platforms frameworks are in my opinion Qt, wxWidgets, GTK+.在我看来,目前最好的跨平台框架是 Qt、wxWidgets、GTK+。

There's a list of them there:那里有他们的名单:

https://en.wikipedia.org/wiki/List_of_platform-independent_GUI_libraries https://en.wikipedia.org/wiki/List_of_platform-independent_GUI_libraries

In my opinion the best free framework at the moment, compatible with several OS (Windows, Linux, MAC, Android, iOS, etc.) with the best documentation is Qt.在我看来,目前最好的免费框架,与多个操作系统(Windows、Linux、MAC、Android、iOS 等)兼容,文档最好的是 Qt。

https://www.qt.io/download/ https://www.qt.io/download/

Download this framework, and develop with QtCreator and you won't regret it.下载这个框架,用 QtCreator 开发,你不会后悔的。

You could still develop with Visual Studio and Qt, however QtCreator makes the Qt integration easier, and has a better text editor out of the box.您仍然可以使用 Visual Studio 和 Qt 进行开发,但是 QtCreator 使 Qt 集成更容易,并且具有更好的开箱即用的文本编辑器。 Also it has GUI editor that makes creating forms much easier.它还具有 GUI 编辑器,可以更轻松地创建表单。

Qt also supports several databases, and has a driver for MySQL, as many others as you can see on this page: Qt 还支持多种数据库,并有一个 MySQL 驱动程序,正如您在此页面上看到的那样:

http://doc.qt.io/qt-5.4/sql-driver.html http://doc.qt.io/qt-5.4/sql-driver.html

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

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