Is it possible to detect pregnancy in a woman who is dead considering the fact that she did not a have a showing belly.
Answer is obviously yes. Here's an article reporting a forensic method used to detect pregnancy using placental markers in a Reverse Transcriptase PCR from a DNA sample. It could be applied in a death body, when it's possible to get a DNA sample from a tissue.
As a general rule, there are more diagnostic options available in a postmortem than in a living subject. While there are some diagnostic tests that aren't as helpful postmortem as they are in the living subject, the additional tests you can do are more definitive rather than less.
Early presumptive diagnosis of a pregnancy in living subjects is through $\beta$-hCG. Definitive diagnosis of an intrauterine pregnancy is through sonographic visualization of a gestational sac. In postmortem $\beta-hCG$ can be done on samples of blood, urine, vitreous humor (fluid in the eyeball), and bile. $\beta$-hCG is pretty routinely included in a postmortem for a woman of child bearing age. Examination of the uterus and intrauterine contents is considerably easier and more thorough postmortem, because, well, you can examine it directly instead of through external imaging.
You can't, of course, detect fetal heart tones or fetal movements if the fetus is dead but this is no different from an examination of a live mother.