Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 12 results for
decorationrole
- Page 1
Displaying Images in QListView with same thumbnail size keeping aspect rati
Programming
Software Development
10 Years Ago
by krystosan
…(self, index, role): if index.isValid() and role == QtCore.Qt.
DecorationRole
: return QtGui.QIcon(QtGui.QPixmap(self.listdata[index.row()])) if…
Re: Displaying Images in QListView with same thumbnail size keeping aspect rati
Programming
Software Development
10 Years Ago
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
10 Years Ago
by krystosan
…(self, index, role): if index.isValid() and role == QtCore.Qt.
DecorationRole
: s = QtCore.QSize(250, 200) return QtGui.QIcon(QtGui.QPixmap…
need serious help setting up images height width in QTableView
Programming
Software Development
10 Years Ago
by krystosan
… QtCore.QString(fileName) if index.isValid() and role == QtCore.Qt.
DecorationRole
: row = index.row() column = index.column() value = self._listdata[row…
What is this code doing(Rapid Gui Programming with Python and Qt)
Programming
Software Development
9 Years Ago
by Odyssey2001
…).__init__(parent) def data(self, index, role): if role == Qt.
DecorationRole
: node = self.nodeFromIndex(index) if node is None: return QVariant…
Re: Displaying Images in QListView with same thumbnail size keeping aspect rati
Programming
Software Development
10 Years Ago
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
10 Years Ago
by krystosan
i am using Qt 4.8.2
Re: What is this code doing(Rapid Gui Programming with Python and Qt)
Programming
Software Development
9 Years Ago
by HiHe
The MainForm `__init__` arguments are (self, filename, nesting, separator, parent=None) and should give you a hint The author of the book does not do any necessary commenting and should be discounted. I would return the lousy book.
Re: What is this code doing(Rapid Gui Programming with Python and Qt)
Programming
Software Development
9 Years Ago
by juanpa_2510
__file__ is the name of de module file that is actually in use. os.path.dirname gets the directory path where the __file__ is stored. os.path.join creates a new path concatenating first argument to second argument.
Re: What is this code doing(Rapid Gui Programming with Python and Qt)
Programming
Software Development
9 Years Ago
by Odyssey2001
Thank you -both of you- for your time and for your answers! @HiHe : It's actually a very good book.The writer explains most of the code in the book.It's entirely my fault.It's just that I'm a beginner in programming and I can't understand some parts of the code if they are not explained in detail (or at all).
Re: What is this code doing(Rapid Gui Programming with Python and Qt)
Programming
Software Development
9 Years Ago
by vegaseat
One good tool to see what is going on in strange code is to put in temporary test print()
Re: What is this code doing(Rapid Gui Programming with Python and Qt)
Programming
Software Development
9 Years Ago
by Odyssey2001
Although I'm a little bit late,thank you!!!I'll keep that in mind!
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
Forums
Top Members
Meet People
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