Displaying Images in QListView with same thumbnail size keeping aspect rati Programming Software Development by krystosan …0]) else: return QtCore.QVariant() class MyListView(QtGui.QListView): """docstring for MyListView""…self).__init__() # show in Icon Mode self.setViewMode(QtGui.QListView.IconMode) crntDir = "/Users/sanjeevkumar/Pictures/tempting"… Re: Displaying Images in QListView with same thumbnail size keeping aspect rati Programming Software Development by vegaseat What version are you using? QVariant() hasn't been around for ages! Re: Displaying Images in QListView with same thumbnail size keeping aspect rati Programming Software Development by Andrei_1 try this : def data(self, index, role): if index.isValid() and role == QtCore.Qt.DecorationRole: s = QtCore.QSize(250, 200) pict = QtGui.QIcon(QtGui.QPixmap(self.listdata[index.row()]).scaled(s)) return pict Re: Displaying Images in QListView with same thumbnail size keeping aspect rati Programming Software Development by krystosan I tried it but didnt work :( def data(self, index, role): if index.isValid() and role == QtCore.Qt.DecorationRole: s = QtCore.QSize(250, 200) return QtGui.QIcon(QtGui.QPixmap(self.listdata[index.row()]).scaled(s)) if index.isValid() and role == QtCore.Qt.DisplayRole:… Re: Displaying Images in QListView with same thumbnail size keeping aspect rati Programming Software Development by krystosan i am using Qt 4.8.2 qt desinger (QlistViewitem) and python Programming Software Development by klia ….calendarWidget.setObjectName("calendarWidget") self.listView = QtGui.QListView(self.centralwidget) self.listView.setGeometry(QtCore.QRect(10,20,181….listView.setObjectName("listView") self.listView_2 = QtGui.QListView(self.centralwidget) self.listView_2.setGeometry(QtCore.QRect(10,330,181… when to use any data model when working in Qt Framework Programming Software Development by krystosan … used data model since I am building list in the QListView of task that will be performed in batch. So how… Re: Python GUI Programming Programming Software Development by bumsfeld …, 250) self.setWindowTitle("Match words with PyQT's QListView") self.words = words # create objects self.label…QLineEdit() self.lmodel = MyListModel(self, self.words) self.lview = QListView() self.lview.setModel(self.lmodel) # layout layout = QVBoxLayout() … Re: Python GUI Programming Programming Software Development by HiHe … run_ps_listview_match2.py example using PySide's QListView and QAbstractListModel to match a partially typed…(QLineEdit, 'lineEdit') self.lview = self.widget.findChild(QListView, 'listView') # create model objects # words is…<item> <widget class="QListView" name="listView"/> </… Re: Python GUI Programming Programming Software Development by vegaseat … XML file ... ''' run_ps_listview_match2.py example using PySide's QListView and QAbstractListModel to match a partially typed word to words… self.widget.findChild(QLineEdit, 'lineEdit') self.lview = self.widget.findChild(QListView, 'listView') # create model objects # words is a list of … Re: when to use any data model when working in Qt Framework Programming Software Development 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: when to use any data model when working in Qt Framework Programming Software Development by krystosan i got exactly what i was looking for [here](http://helpful.knobs-dials.com/index.php/Qt_and_PyQt_notes)