关于零基础:CC语言基础知识总结Mysql-join-连接查询

一、连贯查问: 是将两个查问(或表)的每一行,以“两两横同对接”的形式,所失去的所有行的后果,即一个表中的某行,跟另一个表中的某行。进行“横向对接”,失去一个新行。 连贯查问包含以下这些不同模式,连贯形式:穿插连贯、内连贯、外连贯(分:左外连贯,右外连贯) 连贯查问语法: select * from 表名 [连贯形式] join 表名 [on 连贯条件] where ...; 测试数据: mysql> select * from test;+----+--------+------+------+| id | name | sex | age |+----+--------+------+------+| 1 | name1 | 女 | 15 || 2 | name1 | 女 | 15 || 4 | name2 | 男 | 30 || 5 | name50 | 男 | 12 |+----+--------+------+------+mysql> select * from user;+----+-------+------+| id | name | age |+----+-------+------+| 1 | name1 | 18 || 2 | name2 | 15 || 3 | name3 | 20 || 4 | name4 | 30 |+----+-------+------+ 材料视频收费获取:https://jq.qq.com/?_wv=1027&k=jUsaRsWY,学习直通车穿插连贯 (cross join): ...

November 18, 2020 · 4 min · jiezi

关于零基础:本科学历的我从事Qt开发工程分享处理常见的几个Qt编程问题

前言:Qt是一个1991年由Qt Company开发的跨平台 C++ 图形用户界面利用程序开发框架。它既能够开发GUI程序,也可用于开发非GUI程序,比方控制台工具和服务器。Qt是面向对象的框架,应用非凡的代码生成扩大(称为元对象编译器(MetaObject Compiler, moc))以及一些宏,Qt很容易扩大,并且容许真正地组件编程。 1、如果在窗体敞开前自行判断是否可敞开答: 从新实现这个窗体的closeEvent()函数,退出判断操作。代码演示: void MainWindow::closeEvent(QCloseEvent *event){ if (maybeSave()) { writeSettings(); event->accept(); } else { event->ignore(); }}2、如何用关上和保留文件对话答:应用QFileDialog代码演示: QString fileName = QFileDialog::getOpenFileName(this); if (!fileName.isEmpty()) { loadFile(fileName); }3、如果创立Actions(可在菜单和工具栏里应用这些Action)代码演示: newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this); newAct->setShortcut(tr("Ctrl+N")); newAct->setStatusTip(tr("Create a new file")); connect(newAct, SIGNAL(triggered()), this, SLOT(newFile())); openAct = new QAction(QIcon(":/images/open.png"), tr("&Open"), this); openAct->setShortcut(tr("Ctrl+O")); openAct->setStatusTip(tr("Open an existing file")); connect(openAct, SIGNAL(triggered()), this, SLOT(open())); saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this); saveAct->setShortcut(tr("Ctrl+S")); saveAct->setStatusTip(tr("Save the document to disk")); connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); saveAsAct = new QAction(tr("Save &As"), this); saveAsAct->setStatusTip(tr("Save the document under a new name")); connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs())); exitAct = new QAction(tr("E&xit"), this); exitAct->setShortcut(tr("Ctrl+Q")); exitAct->setStatusTip(tr("Exit the application")); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this); cutAct->setShortcut(tr("Ctrl+X")); cutAct->setStatusTip(tr("Cut the current selection's contents to the " "clipboard")); connect(cutAct, SIGNAL(triggered()), textEdit, SLOT(cut())); copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this); copyAct->setShortcut(tr("Ctrl+C")); copyAct->setStatusTip(tr("Copy the current selection's contents to the " "clipboard")); connect(copyAct, SIGNAL(triggered()), textEdit, SLOT(copy())); pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this); pasteAct->setShortcut(tr("Ctrl+V")); pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current " "selection")); connect(pasteAct, SIGNAL(triggered()), textEdit, SLOT(paste())); aboutAct = new QAction(tr("&About"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); aboutQtAct = new QAction(tr("About &Qt"), this); aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));4、如果创立主菜单答:采纳下面的QAction的帮忙,创立主菜单代码演示: ...

November 13, 2020 · 2 min · jiezi