In[]:=
QQ[t_]:=Hold[If[EvenQ[Floor[t]],0,1]]​​qq[X_]:=NIntegrate[QQ[v],{v,0,X}]​​Plot[qq[u],{u,0,5}]
NIntegrate
:Integral and error estimates are 0 on all integration subregions. Try increasing the value of the MinRecursion option. If value of integral may be 0, specify a finite value for the AccuracyGoal option.
Out[]=