Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to highlight default row in Qtablewidget.



  • This post is deleted!


  • @yashi95
    Start with: is the first row actually selected, and where/when exactly do you put the code you show?



  • here some part of code
    self.tblDropdown = self.dialogDropdown.findChild(
    QTableWidget, "tbl_dropdown")
    dropdownList = args[2]["list"]
    self.tblDropdown.setStyleSheet('selection-color: rgb(114, 159, 207);')
    Please ignore that picture which i posted in my question i want like that be hightlight



  • @yashi95
    I asked you two questions:

    1. is the first row actually selected
    2. where/when [is it executed] exactly do you put the code you show

    neither of which you answered.

    BTW, it worked for me just fine. So if not for you I suggest you test it in a standalone, minimal example.


Log in to reply