Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2928

QTableView RightToLeft

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.8.0
    • PySide
    • None
    • macOS, Windows

    Description

      if you  make a
      from PySide6.QtWidgets import QTableView
      or 
      from PyQt6.QtWidgets import QTableView

      table_view = QTableView()
      and then do 
      table_view.setLayoutDirection(Qt.LayoutDirection.RightToLeft)

      or

      table_view.setLayoutDirection(Qt.LeftToRight)
      it causes several issues.
      vertical headers become unselectable, 
      self.table_view.selectRow(0)
      and
      self.table_view.selectColumn(0)
      dont work anymore.
      if you drag and drop a row it becomes the whole selection goes crazy. 
       

      this is also true if you change layout direction on the app level. 

      meaning this issue exists if you do 
      Qapp = QApplication(sys.argv)
      Qapp.setLayoutDirection(Qt.RightToLeft)
      or 
      Qapp.setLayoutDirection(Qt.LayoutDirection.RightToLeft)

       

      also horizontal scrolling at least on a Mac with finger gesture is going the wrong direction

      I have attached an example

      Attachments

        1. BugExample.py
          2 kB
          Amir Afrashtehpour
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            amiraf Amir Afrashtehpour
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes