Qt 駕校科目 考試系統 提交分數

2021-10-08 08:12:47 字數 3046 閱讀 9530

//過濾答案行if(

(nlines >=

6&& nlines <=6*

9&&(nlines %6==

0))||

(nlines ==6*

9+4)

) strtext +

= stream.

readline()

; strtext +

="\n"

; nlines++;}

m_textedit-

>

settext

(strtext)

; m_layout-

>

addwidget

(m_textedit,0,

0,1,

10); file.

close()

;return

true;}

else

}void exandialog::

initbuttons()

;for

(int i =

0; i<

10; i++)if

(i <

8) m_btngroups[i]

=new

qbuttongroup

(this);

//選擇題

for(

int j=

0; j<

4; j++

)else

//單項選擇題}}

qpushbutton *submitbtn =

newqpushbutton

(this);

submitbtn-

>

settext

("提交");

submitbtn-

>

setfixedsize

(100,35

);connect

(submitbtn,

signal

(clicked

(bool))

,this

,slot

(getscore()

)); m_layout-

>

addwidget

(submitbtn,6,

9);}

bool exandialog::

hasnoselect()

}if(radioselects !=8)

int checkselect =0;

for(

int i =

0; i <

4; i++)}

if(checkselect ==

0|| checkselect ==1)

if(!m_radioa-

>

ischecked()

&&!m_radiob-

>

ischecked()

)return

false;}

void exandialog::

freshtime()

void exandialog::

getscore()

int scores =0;

for(

int i =

0; i <

10; i++)}

if(i ==8)

//多選選擇題計分

if(i ==9)

//判斷題計分}}

qstring str =

"您的分數是: "

+ qstring::

number

(scores)

+"分, 是否重新考試? "

;int res = qmessagebox::

information

(this

,"提示"

, str, qmessagebox::yes | qmessagebox::no);if

(res == qmessagebox::yes)

else

}執行結果:

時間: 2020-07-20

Qt 駕校科目 考試系統 驗證賬號密碼

表示匹配次數至少n次,至多m次 qregexp rx a za z0 9 a za z0 9 a za z0 9 a za z bool res rx.exactmatch ui accountedit text if res false 匹配不成功 else else qmessagebox in...

駕校科目三考試專案

上車前前後檢視 驗證指紋 前後檢視後開車門 上車後調整座椅 安全帶 空檔 點火 燈光模擬 前後 左右觀察後 開左轉向燈 一檔起步 鬆手剎 送離合器 穩定 送剎車 開左轉向燈 變換燈光 多次檢視左後方車輛 前方車輛情況 加速 加檔 進入超車車道 注意控制方向盤方向 前後方有車時候要注意控制速度 開轉向...

上海錦隆駕校 科目三 2023年考試心得實錄

寫在前面,選個好教練非常重要,我的教練姓 呂,是位女教練。之前的職業是開長途貨車的,教我們的時候,基本都是很實用的駕駛技能,剛開始不太相信,但考試和模擬期間看到別人駕駛的技巧和轉彎,真的沒法看 拿完駕照的第二天,我就直接租車上路了,一點問題都沒有,非常輕鬆,連同事都說你不像剛拿駕照的人 一 準備工作...