Search code examples
qtqlistwidget

Qt: QListWidget separator line between items?


I can't find any way to put a line between items in my list. Am I missing something?


Solution

  • A style sheet would be easiest, for example:

    myListWidget->setStyleSheet( "QListWidget::item { border-bottom: 1px solid black; }" );
    

    You'll want to look at some of the style sheet documentation