zoukankan      html  css  js  c++  java
  • 表格对象QTableWidget相关常见方法

    QWidget

    bool close (self)
    QRect geometry (self)
    hide (self)
    int height (self)
    setStatusTip (self, QString)
    setWindowIcon (self, QIcon icon)
    setWindowTitle (self, QString)
    int width (self)

    QTableView
    int columnWidth (self, int column)
    columnResized (self, int column, int oldWidth, int newWidth)
    hideColumn (self, int column)
    hideRow (self, int row)
    int rowHeight (self, int row)
    rowResized (self, int row, int oldHeight, int newHeight)

    resizeColumnsToContents (self)

    self.tableWidget.resizeColumnsToContents()
    resizeColumnToContents (self, int column)
    resizeRowsToContents (self)
    resizeRowToContents (self, int row)

    QTableWidget

    QWidget cellWidget (self, int row, int column)
    clear (self)
    int column (self, QTableWidgetItem item)
    int columnCount (self)
    QTableWidgetItem currentItem (self)
    QTableWidgetItem item (self, int row, int column)
    removeCellWidget (self, int arow, int acolumn)
    removeColumn (self, int column)
    removeRow (self, int row)
    int row (self, QTableWidgetItem item)
    int rowCount (self)
    setCellWidget (self, int row, int column, QWidget widget)
    setColumnCount (self, int columns)
    setRowCount (self, int rows)
    setHorizontalHeaderLabels (self, QStringList labels)

    self.tableWidget.setHorizontalHeaderLabels([u'包/文件名', u'上传时间', u'SVN路径'])


    setVerticalHeaderLabels (self, QStringList labels)
    insertColumn (self, int column)
    insertRow (self, int row)
    setItem (self, int row, int column, QTableWidgetItem item)

    QTableWidgetItem

    int column (self)
    int row (self)
    setBackgroundColor (self, QColor color)
    setText (self, QString atext)
    setTextColor (self, QColor color)
    QString text (self)

  • 相关阅读:
    CF终于上紫了。。。
    CF567F/51nod2522 上下序列
    bzoj 前100题计划
    CF1110G Tree-Tac-Toe 博弈论、构造
    BZOJ4816 SDOI2017 数字表格 莫比乌斯反演
    UOJ400/LOJ2553 CTSC2018 暴力写挂 边分治、虚树
    Luogu4774 NOI2018 屠龙勇士 ExCRT
    CF1039D You Are Given a Tree 根号分治、二分、贪心
    CF1056E Check Transcription 字符串哈希
    Luogu4345 SHOI2015 超能粒子炮·改 Lucas、数位DP
  • 原文地址:https://www.cnblogs.com/hushaojun/p/4648446.html
Copyright © 2011-2022 走看看