qtablewidget用起来也很方便,并不比前面的两个复杂到哪里去。我们运行的结果是这样子的: 下面是代码: tablewidget.h #ifndef TABLEWIDGET_H #define TABLEWIDGET_H #include class TableWidget : public QWidget { public: TableWidget(); private: qtablewidget *table; }; #endif // TABLEWIDGET_H tablewidget.cpp #include "tablewidget.h" TableWidget::Tab...
by Send_linux - 移动操作系统 - 2010-02-22 10:15:56 阅读(2892) 回复(0)
本帖最后由 anonymous0502 于 2012-07-05 16:10 编辑 这是一段demo:[code]#!/usr/bin/python # -*- coding: utf-8 -*- import sys from PySide.QtCore import * from PySide.QtGui import * def myprint(obj, end='\n'): sys.stdout.write(str(obj) + end) class cuwindow(QWidget): def __init__(self): QWidget.__init__(self) self.initgui() self.btn_get.clicked.connect(self.tes...
我在qtablewidget中添加若干qcombobox控件,现在想点击qcombobox中下拉菜单项,返回所在位置的索引,比如在几行几列。谢谢。 还有就是这个connect里面的内容是什么?是connect(tablewidget, SIGNAL(itemClicked()), this, SLOT(fun())) 还是 connect(combobox, SIGNAL(currentIndex()), this, SLOT(fun()))?谢谢!!!