Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to highlight default row in Qtablewidget.
Qt 6.11 is out! See what's new in the release blog

How to highlight default row in Qtablewidget.

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 908 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yashi95
    wrote on last edited by
    #1
    This post is deleted!
    JonBJ 1 Reply Last reply
    0
    • Y yashi95

      This post is deleted!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yashi95
        wrote on last edited by
        #3

        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

        JonBJ 1 Reply Last reply
        0
        • Y yashi95

          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

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved