def sizeHint(dgt, option, qtindex): view = dgt.parent() offset = view.verticalOffset() + option.rect.y() try: thumb_path = dgt.get_thumb_path_if_exists(view, offset, qtindex) if thumb_path is not None: # Read the precomputed thumbnail width, height = read_thumb_size(thumb_path) return QtCore.QSize(width, height) else: # print("[APIThumbDelegate] Name not found") return QtCore.QSize() except Exception as ex: print('Error in APIThumbDelegate') ut.printex(ex, 'Error in APIThumbDelegate', tb=True, iswarning=True) return QtCore.QSize()
def _init_table_behavior(view): """ Table behavior SeeAlso: api_item_view._init_itemview_behavior """ # Allow sorting by column view.setCornerButtonEnabled(False) view.setShowGrid(True) view.setIconSize(QtCore.QSize(64, 64))
def sizeHint(qres_wgt): # should eventually improve this to use the widths of the header columns return QtCore.QSize(1100, 500)
def sizeHint(option, qindex): # QStyleOptionViewItem option return QtCore.QSize(50, 50)