Native-Exam-Analyse【自助考试系统】

Widget

多线程(movetothread)

为table添加菜单

 


				ui->setupUi(this);
					


					this->setLayout(ui->verticalLayout_main);
					

 


				setPaper
					=
							new
									SetPaper;
									


				receiver
					=
							new
									Receiver();
									


					QThread
							*th =
									new
											QThread();
											


				receiver->moveToThread(th);
			


				th->start();
			


				analyze
					=
							new
									Analyzer();
									


				thread
					=
							new
									QThread();
									


				sender
					=
							new
									Sender();
									


				analyze->moveToThread(thread);
			

 

 


				showTimeTimer
					=
							new
									QTimer;
									


				confirmTimer
					=
							new
									QTimer;
									

 


					//添加tabel的右键
				


				ui->tableWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
							


					QAction*
							actionView
								=
										new
												QAction("查看学生试卷");
														


					QAction*
							actionDelete
								=
										new
												QAction("删除一行");
														


				ui->tableWidget->addAction(actionView);
			

//
						ui->tableWidget->addAction(actionDelete);
					

 


				connect(actionView,
						SIGNAL(triggered()),
						


					this,
								SLOT(viewStuPaper()));
								


				connect(actionDelete,
						SIGNAL(triggered()),
						


					this,
								SLOT(deleteRow()));
								

 


				connect(setPaper,&SetPaper::updateTimeSignal,
					


					this,&Widget::updateTimeSlot);
							

 


				connect(setPaper,&SetPaper::prepareNewExamSignal,
			


					this,&Widget::prepareNewExamSlot);
							

 


				connect(receiver,&Receiver::updateStuExamInfoSignal,
					


					this,&Widget::updateStuExamInfoSlot);
							

 

 

 

 

 

 

 

表格文件读取(使用开源工具读取电子表格)

界面设置

电子表格操作

表格文件读取

 

原文地址:https://www.cnblogs.com/tangyuanjie/p/14028243.html