Re: Same Problem(Width mismatch. Expected width 8, Actual width is 3 for dimension 1
Solve which problem? Line 40 looks simply wrong.
Output Q is already assigned in combinational part of the process, the assignments in line 35 and 40 will be ignored if the syntax error is solved.
Before fixing the code, you should clarify what you want to achieve.
If the intended function is to register the decoded signal, you can use an auxiliary signal. Or execute the decoder under the clock edge sensitive condition.