You can't put a \chapter or \addtocomments command in your preamble.
That's why you're getting the error. These commands go in the document
itself.
What you want to do here, I think, is put
\addtocontents{toc}{\protect\mbox{}\protect\hrulefill\par}
as ERT immediately following the chapter tit
Hi,
I am trying to write my thesis using lyx (koma-script report class). But
i would like to format the toc, lof and lot to have something like the
table in attachment. I tried to make use of tocloft and just having a
look at titlesec/titletoc package but i am not sure if this is the
best s