/****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.14.2
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
static const unsigned char qt_resource_data[] = {
// E:/QTcreator/projects/QT/day9/04hmwk/04hmwk/icon/login.png
0x0,0x2,0x1c,0xf3,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x1,0xa5,0x0,0x0,0x1,0xa6,0x8,0x6,0x0,0x0,0x0,0xdc,0x46,0x9b,0x0,
0x0,0x0,0x20,0x0,0x49,0x44,0x41,0x54,0x78,0x9c,0xec,0xbd,0x67,0x93,0x24,0xc9,
0x91,0x25,0xa8,0xee,0x1e,0x1e,0x2c,0x59,0x65,0x16,0xeb,0x6a,0x8a,0x6,0x27,0x3,
0x34,0x30,0x18,0xc,0x80,0x1,0x6,0xc0,0x90,0x25,0x32,0xb3,0xb2,0x22,0x77,0x22,
0xf7,0xf,0xef,0xe3,0xad,0xac,0xc8,0xed,0xca,0x9e,0x2c,0x86,0x62,0x8,0x38,0x7,
0x9a,0xa1,0x1b,0xdd,0x8d,0x26,0xc5,0xab,0xb2,0x92,0x7,0x71,0x77,0x3b,0x7b,0x6a,
0xa6,0xee,0x1a,0x96,0xee,0x11,0x99,0x91,0x99,0x55,0x59,0xd5,0xa1,0x25,0x51,0x11,
0xe9,0x9c,0x98,0xd9,0x33,0x55,0x7d,0xaa,0x1a,0x19,0x2b,0xb4,0x90,0xf,0xa5,0x2c,
0x5e,0x7d,0x25,0xf2,0x2c,0x4e,0xfa,0x4c,0xa2,0x28,0x3a,0xd1,0xfa,0x93,0x6e,0xbf,
0x90,0x85,0x3c,0xee,0xd2,0x7a,0xd4,0x17,0xb0,0x90,0x47,0x27,0x4f,0xa,0x28,0xe1,
0x3e,0xe6,0xb9,0x17,0xbd,0xcf,0x69,0x81,0x12,0x64,0x1a,0x90,0xc4,0x71,0x7c,0xe4,
0x63,0xe0,0x73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
0x33,0x15,0x4c,0x3,0xc9,0xa6,0xe7,0x35,0xcd,0xf4,0x37,0x4b,0x73,0x3d,0xaa,0x36,
0xd4,0xb4,0xee,0x61,0x1,0xd3,0x69,0x1c,0x5b,0x6b,0x96,0x32,0x21,0x8,0x9,0xb,
0xfa,0xb9,0xcb,0x39,0x35,0x30,0x89,0x4f,0x6a,0x38,0x1c,0xd6,0x4e,0x44,0x44,0xdb,
0xd5,0x80,0x34,0x2b,0xb0,0x77,0x21,0xb,0xd1,0xb2,0x0,0xa5,0x53,0x96,0x69,0x8f,
0x73,0x5e,0xb3,0xdb,0x34,0x70,0x82,0x1c,0x5,0x94,0xf4,0x7e,0xe1,0xe0,0xaf,0x41,
0x29,0xc,0x60,0x95,0x41,0x48,0x9b,0xe6,0x4,0x84,0xb4,0x39,0x4e,0x6,0x25,0xc9,
0xd8,0x10,0x6a,0x4f,0x75,0x41,0xab,0x75,0xe7,0x6f,0xd2,0x84,0x42,0xad,0xaa,0xee,
0x7b,0x72,0x19,0xff,0x7f,0x22,0x73,0xea,0x51,0x35,0xa5,0xe3,0xc,0xb0,0xf3,0xe,
0xc6,0xf,0x63,0x10,0xaf,0x9b,0x10,0x84,0x66,0x53,0x69,0x7,0xa2,0x39,0x89,0x2f,
0x4a,0xda,0xb,0x4,0x1a,0xb2,0xd6
2023/9/18 - C++/QT 实现简易登录
需积分: 0 81 浏览量
更新于2023-09-18
收藏 5.59MB ZIP 举报
在本项目中,我们关注的是使用C++编程语言与QT框架来实现一个简单的登录系统。QT是一个跨平台的开发框架,广泛应用于GUI应用程序的构建,它提供了丰富的库和工具,使得开发者可以方便地创建功能丰富的桌面和移动应用。
C++是这个项目的基础,它是一种通用的、面向对象的编程语言,以其高效性和灵活性而闻名。C++提供了丰富的库支持,包括STL(标准模板库),可以用来处理数据结构和算法,以及Boost库,用于扩展C++的功能。
在"2023/9/18 - C++/QT 实现简易登录"的项目中,开发者可能首先会创建一个QT界面,该界面通常包含两个输入字段:用户名和密码,以及一个登录按钮。这些元素可以通过QT Designer工具可视化设计,或者使用QML(QT的声明性UI语言)编写。完成后,界面的代码会生成一个.ui文件,然后使用QT的uic工具转换为C++头文件。
在C++代码部分,开发者会创建一个主窗口类,继承自`QWidget`或`QMainWindow`,并包含处理用户输入和验证登录信息的函数。当用户点击登录按钮时,会触发一个信号(如`clicked()`),这将调用一个槽函数,该函数负责读取输入框中的文本,通常使用`lineEdit`对象的`text()`方法获取。
为了存储和验证登录凭据,开发者可能会选择一个简单的数据存储方式,如文本文件或SQLite数据库。如果是文本文件,可以使用`QFile`和`QTextStream`读写数据;如果是SQLite,可以利用QT的`QSqlDatabase`、`QSqlQuery`等类进行操作。在验证过程中,通常会比较输入的用户名和密码与存储的记录,如果匹配则登录成功,否则显示错误信息。
安全方面,尽管这是一个简单的登录示例,但最好还是对用户的密码进行加密存储,例如使用哈希函数(如SHA-256)和加盐值,以提高安全性。不过,这个简单的项目可能没有涉及这些高级概念。
在编译和运行阶段,QT的构建系统qmake或CMake可以生成Makefile,然后使用g++等编译器进行编译链接。在`build-04hmwk-Desktop_Qt_5_14_2_MinGW_64_bit-Debug`目录下,包含了编译生成的可执行文件和其他相关中间文件,如编译产生的.o对象文件。
这个项目涵盖了C++基础、QT GUI编程、事件驱动编程、数据存储和简单的用户验证逻辑。通过实践这个项目,开发者可以深入理解C++和QT的结合使用,以及如何构建一个基本的交互式应用。