Python Forum
[PyQt] Determine whether text in QTableView cell is fully visible or not
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Determine whether text in QTableView cell is fully visible or not

I need to implement a feature for QTableView which many spreadsheet programs have. For example, LibreOffice Calc shows an arrow for a cell if text within this cell cannot be made fully visible without resizing it.

I know about sizeHint method, however calculating a height for each cell takes about the same time as resizing the table by contents, i.e. it is very slow (my program which needs to show 400x10 table becomes about 5 times slower).

So, if there is a fast method to tell if text fully fits the cell?

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] QTableView set header labels HeinKurz 2 189 Jan-23-2023, 08:46 AM
Last Post: HeinKurz
  [Tkinter] how to make label or button not visible with the place method? nowayj63 2 224 Jan-03-2023, 06:29 PM
Last Post: Yoriz
  [PyQt] QTableView: scroll to top cell of the screen random_nick 2 735 Oct-08-2022, 12:29 AM
Last Post: random_nick
  [PyQt] [Solved]Add a Blank Row To QTableView Extra 3 1,324 Oct-02-2022, 04:53 PM
Last Post: Extra
  [PyQt] QStyledItemDelegate and QTableView malonn 0 347 Sep-27-2022, 09:31 AM
Last Post: malonn
  How to update the list of a combo box in a QTableView panoss 10 3,602 Feb-05-2022, 03:24 PM
Last Post: panoss
  [PyQt] How to Copy-Paste a table from Office apps to QTableView? Vittorio 5 4,486 Aug-05-2021, 11:14 AM
Last Post: Axel_Erfurt
  [PyQt] Qtableview adapte size to WBPYTHON 3 7,391 Mar-23-2020, 01:51 AM
Last Post: deanhystad
  [PyGUI] Showing text in QTableView sequence 0 2,486 Jan-20-2019, 05:00 PM
Last Post: sequence
  Make a fully functional program as a library frequency 3 1,997 Dec-26-2018, 12:18 PM
Last Post: frequency

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020