摘要: 首先上代码 这个东东中,AuthService就是触及了循环依赖的东西(纯自学搞了半天才找出毛病),首先什么是循环依赖,唉!问题来了 在某些文章是这样说的 "Circular dependency" error¶ 偶尔你会发现在你的应用程序中很难避免circular dependencies。 您需 阅读全文
posted @ 2024-02-02 19:37 术术子 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 一、qt的其他类族 2.Qlabel ui->setupUi(this); QFont font;//确立一个字体对象 font.setFamily("华文行楷");//字体 font.setPointSize(20);//字体的大小 font.setBold(true);//字体是否变粗 font 阅读全文
posted @ 2022-12-26 14:33 术术子 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 一、标准对话框 1.对于颜色对话框 void MyWidget::on_pushButton_clicked() { QColorDialog dialog(Qt::red,this); dialog.setOption(QColorDialog::ShowAlphaChannel);//显示alp 阅读全文
posted @ 2022-12-23 14:04 术术子 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 1.窗口、字部件以及窗口类型(记得不牢固的) (1)#include<QtWidget> Widgets是在Qt中创建用户界面的主要元素。 Widgets可以显示数据和状态信息,接收用户输入,并为应该组合在一起的其他小部件提供容器。 未嵌入到父窗口小部件中的窗口小部件称为窗口。 (2)对话框QDia 阅读全文
posted @ 2022-12-22 10:07 术术子 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 第一题: #include <iostream> #include <vector> #include <iterator> #include <string> using namespace std; bool huiwen(string input); int main() { string i 阅读全文
posted @ 2022-10-16 20:27 术术子 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 第一题目#include <stdio.h> #define SIZE 5 static int F=0; static int counts=0; typedef struct Queue { int rear; int num_str[SIZE]; }Queue,*queue; void ini 阅读全文
posted @ 2022-10-16 14:02 术术子 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 第一题: // base class class Cd { // represents a CD disk private: char performers[50]; char label[20]; int selections; // number of selections double pla 阅读全文
posted @ 2022-08-23 16:42 术术子 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 第一题 1. 对于下面的类声明: class Cow { char name[20]; char *hobby; double weight; public: Cow(); Cow(const char * nm, const char * ho, double wt); Cow(const Cow 阅读全文
posted @ 2022-08-18 16:07 术术子 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 第一题 vect.h: #ifndef VECTOR_H_ #define VECTOR_H_ #include <iostream> namespace VECTOR { class Vector { public: enum Mode {RECT, POL}; // RECT for recta 阅读全文
posted @ 2022-08-06 16:46 术术子 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 第一题: 为复习题5描述的类提供方法定义,并编写一个小程序来演示所有的特性: bank.h #ifndef BACK_H_ #define BACK_H_ #include <string> class Bankaccount { private: std::string accountname;/ 阅读全文
posted @ 2022-07-29 14:35 术术子 阅读(46) 评论(0) 推荐(0) 编辑