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
#1
Hi!

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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] cutomtkinter matplotlib no x,y - xaxis and x,y - labels-> only graph and grid visible dduric 0 304 Feb-20-2024, 07:09 PM
Last Post: dduric
  [PyQt] PyQt5 QTableView SQLite : edit cell HeinKurz 2 2,367 Mar-27-2023, 10:41 AM
Last Post: HeinKurz
  [PyQt] QStyledItemDelegate and QTableView malonn 1 1,632 Feb-07-2023, 07:15 PM
Last Post: malonn
  [PyQt] QTableView set header labels HeinKurz 2 6,713 Jan-23-2023, 08:46 AM
Last Post: HeinKurz
  [Tkinter] how to make label or button not visible with the place method? nowayj63 2 2,784 Jan-03-2023, 06:29 PM
Last Post: Yoriz
  [PyQt] QTableView: scroll to top cell of the screen random_nick 2 2,832 Oct-08-2022, 12:29 AM
Last Post: random_nick
  [PyQt] [Solved]Add a Blank Row To QTableView Extra 3 5,498 Oct-02-2022, 04:53 PM
Last Post: Extra
  How to update the list of a combo box in a QTableView panoss 10 6,234 Feb-05-2022, 03:24 PM
Last Post: panoss
  [PyQt] How to Copy-Paste a table from Office apps to QTableView? Vittorio 5 7,229 Aug-05-2021, 11:14 AM
Last Post: Axel_Erfurt
  [PyQt] Qtableview adapte size to WBPYTHON 3 11,257 Mar-23-2020, 01:51 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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