Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 15 results for
qabstracttablemodel
- Page 1
Re: Applying PySide's QAbstractTableModel
Programming
Software Development
1 Month Ago
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.
Applying PySide's QAbstractTableModel
Programming
Software Development
11 Years Ago
by vegaseat
Using PySide's
QAbstractTableModel
allows you to easily customize a widget like QTableView and …
need serious help setting up images height width in QTableView
Programming
Software Development
10 Years Ago
by krystosan
… import os from PyQt4 import QtGui, QtCore class MyListModel(QtCore.
QAbstractTableModel
): def __init__(self, datain, col ,parent=None, *args): ""…
Re: Python GUI Programming
Programming
Software Development
14 Years Ago
by Ene Uran
… similar table, this time we use PyQT's QTableView and
QAbstractTableModel
which allows the items in the table to be sorted… the header titles: [code=python]# use PyQT's QTableView and
QAbstractTableModel
# to present tabular data # allow sorting by clicking on the…
Re: pyqt QTableView printing ( c++ translate to python)
Programming
Software Development
11 Years Ago
by HiHe
…: '''pqt_tableview2.py use PyQT's QTableView and
QAbstractTableModel
to present tabular data a rather simplified experiment …200, 400, 250) self.setWindowTitle("PyQT's QTableView and
QAbstractTableModel
") table_model = MyTableModel(self, data_list, header) table_view = …
Re: Python GUI Programming
Programming
Software Development
14 Years Ago
by bumsfeld
…) # enable sorting tview.setSortingEnabled(True) return tview class MyTableModel(
QAbstractTableModel
): def __init__(self, parent, mydata, header, *args): &… length has to match header length """
QAbstractTableModel
.__init__(self, parent, *args) self.mydata = mydata …
Re: when to use any data model when working in Qt Framework
Programming
Software Development
11 Years Ago
by vegaseat
A model allows you to customize a widget or make it more generic. See ... http://www.daniweb.com/software-development/python/code/447834/applying-pysides-
qabstracttablemodel
Re: Applying PySide's QAbstractTableModel
Programming
Software Development
11 Years Ago
by krystosan
can we edit any of the item in the cell ?
Re: Applying PySide's QAbstractTableModel
Programming
Software Development
11 Years Ago
by HiHe
If you model it properly you can.
Re: Applying PySide's QAbstractTableModel
Programming
Software Development
11 Years Ago
by krystosan
So you mean the above example is not properly written ?
Re: Applying PySide's QAbstractTableModel
Programming
Software Development
9 Years Ago
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: Applying PySide's QAbstractTableModel
Programming
Software Development
8 Years Ago
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
8 Years Ago
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.
Re: Applying PySide's QAbstractTableModel
Programming
Software Development
7 Years Ago
by alanmduke
Thanks for this. Best example of a QtableView application I coulld find.
removing column from PyQt QAbstractTableModel
Programming
Software Development
11 Years Ago
by krystosan
I am trying to remove a column from PyQt4 implementation of table model , however I am not able to figure it out what I am doing wrong def removeColumns(self, position, columns, parent = QtCore.QModelIndex()): self.beginRemoveColumns(parent, position, position + columns - 1) #Do removing here rowCount = len(self.__colors…
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC