Re: Applying PySide's QAbstractTableModel Programming Software Development by Mark_94 Even although this topic is 11 years old (in 2024), it's still very helpfulby showing how to properly program in Python3. I've readily translated it to PySide6 and it works fine except for one tiny prob: sorting the MP column with "TypeError: '<' not supported between instances of 'str' and 'float'". I'm not sure how to fix it. pyqt printpreview QTableView Programming Software Development by iraj.jelo I'm trying to print the contents of a QTableView to the printer . i implement bottom script and it run …) from my problem -[FOUNTAIN](http://www.qtcentre.org/threads/3796-QTableView-printing?highlight=Qprinter) def printTable(self,printer,painter,area): model… need serious help setting up images height width in QTableView Programming Software Development by krystosan I have made a QTableView that displays images from disk, there are two seriously agonizing …(fileToRename), newName) except Exception, err: print err class MyTableView(QtGui.QTableView): """docstring for MyTableView""" def… Re: pyqt QTableView printing ( c++ translate to python) Programming Software Development by HiHe … example using PyQT: '''pqt_tableview2.py use PyQT's QTableView and QAbstractTableModel to present tabular data a rather simplified … 200, 400, 250) self.setWindowTitle("PyQT's QTableView and QAbstractTableModel") table_model = MyTableModel(self, data_list, header) table_view… Re: pyqt QTableView printing ( c++ translate to python) Programming Software Development by iraj.jelo vey thanx dear . but i want print a tableView on the paper. i need example for QPrinter and print vew :) [here](http://www.qtcentre.org/threads/3796-QTableView-printing?highlight=Qprinter) is code for c++ and qt but i neet for python and pyqt Qt/Code Design Problem - calling object from another object. Programming Software Development by johnnyturbo3 …I have several classes *MainWindow - holds 2 widgets, a QTableView Widget and a QTabWidget *TabLayout - layout of the tab…db.open(); createDisplay(); } void MainWindow::createDisplay(){ createModelView(); QTableView *view = new QTableView(); view->setModel(model); view->show(); createTabView(); … insert a table view inside a Qtextedit Qt4 Programming Software Development by wkarl i want to Display my QTableView insid QTextEdit ? can i do this thing ?? if i can how i can do it ? Applying PySide's QAbstractTableModel Programming Software Development by vegaseat …'s QAbstractTableModel allows you to easily customize a widget like QTableView and make it more generic in its application. Here we… how to change multipli rows in Qt? Programming Software Development by Brahim_2 …++ i am trying to build a program with database using QTableView QLineEdit QComboBox.. the LineEdit shows a valiu the records filtered… Re: Applying PySide's QAbstractTableModel Programming Software Development by alanmduke Thanks for this. Best example of a QtableView application I coulld find. Re: Python GUI Programming Programming Software Development by bumsfeld …, 200, 460, 300) self.setWindowTitle("Sorting PyQT's QTableView") self.header = header self.mydata = element_list # create….setLayout(layout) def createTable(self): # create table view tview = QTableView() # set table model tmodel = MyTableModel(self, self.mydata, self… Re: Python GUI Programming Programming Software Development by Ene Uran A similar table, this time we use PyQT's QTableView and QAbstractTableModel which allows the items in the table to … clicking on the header titles: [code=python]# use PyQT's QTableView and QAbstractTableModel # to present tabular data # allow sorting by clicking… pyqt QTableView printing ( c++ translate to python) Programming Software Development by iraj.jelo i have a Qt code writed in C++ . i want translate it to python code, but i have a problem in 4 code line: all code is: void TableView::print(QPainter* painter, const QRect& area) { const int rows = model()->rowCount(); const int cols = model()->columnCount(); // calculate the total width/height table would … Re: pyqt QTableView printing ( c++ translate to python) Programming Software Development by iraj.jelo very thanx dear . but i want print a tableView on the paper. i need example for QPrinter and print vew :) here is code for c++ and qt but i neet for python and pyqt Re: pyqt QTableView printing ( c++ translate to python) Programming Software Development by HiHe A typical QPrint example for PyQT: #!/usr/bin/env python """ Lets get the print thing working http://www.riverbankcomputing.com/pipermail/pyqt/2009-January/021592.html """ from PyQt4.QtGui import * from PyQt4.QtCore import * import PyQt4.QtWebKit as QtWebKit import sys… Re: Applying PySide's QAbstractTableModel Programming Software Development by krystosan can we edit any of the item in the cell ? Re: Applying PySide's QAbstractTableModel Programming Software Development by HiHe If you model it properly you can. Re: Applying PySide's QAbstractTableModel Programming Software Development by krystosan So you mean the above example is not properly written ? Re: Applying PySide's QAbstractTableModel Programming Software Development by Rob_3 Great tutorial! I'm new to Python and the MVC concept. The Pyside documentation is detailed and extensive, but without an example of how to use a data model, I'd be lost. Thanks for sharing. Re: how to change multipli rows in Qt? Programming Software Development by richieking This is not automatic but easily doable. You now have the filtered records, You need to get all the filtered records by id, Use the id to change/update all the filtered records Re: Applying PySide's QAbstractTableModel Programming Software Development by Oleg_2 I think MyTableModel.columnCount method should be written as def columnCount(self, parent): return len(self.header) so it will work when len(self.mylist) == 0 Re: Applying PySide's QAbstractTableModel Programming Software Development by vegaseat Should work, good idea. I am surprised that anybody still uses these snippets. I have stopped writing them because there was so little interest.