|
Page 1 of 2 |
|
1
2
|
Next
QtGui.QListWidget Question
Hi alls,
Is there any reason why i can't add to a QtGui.QListWidget from another function. at the moment in my application i set up some tabs, lots of text fields, and then run functions to collect information, in these functions they all update labels. I'm really wanting to replace these labels... (Have spent hours on trying to learn tables, trees blah blah, and just trying to stick to something simple.... - cant even get this working!) If i add to it straight after setting it up ie. Code:
self.listWidget = QtGui.QListWidget(self.tab)But if i try Code:
self.listWidget = QtGui.QListWidget(self.tab)Why am i finding a list box so hard?! - over 4 hours now, and not a simple answer? |
Re: QtGui.QListWidget Question
What's the item you are trying to add in the second function? It is not clear from the code...
(and I am guessing the incorrect indentation in the last line of your code is just a typo, right?) Hartti |
Re: QtGui.QListWidget Question
Quote:
Hehe, yeah the indendation is fine :) - ignore that bit - was tired and frustrated last night... Tried adding strings and the following Code:
for i in range(10): |
Re: QtGui.QListWidget Question
*bump* *bump*
|
Re: QtGui.QListWidget Question
@noobmonkey
I'm playing around with lists myself (finger scrolling) :D This works (indents aside). Not sure what you want to do thats different Code:
# -*- coding: utf-8 -*- |
Re: QtGui.QListWidget Question
Cutting bits of your code, and adding some, here is my equivalent - ignoring tab stops - nightmare to do it right in this window!
Code:
from PyQt4 import QtCore, QtGui |
Re: QtGui.QListWidget Question
Not sure if your code above works
but here is modified version as per you example that works on my system PR 1.1.1 and PyQt 4.7 Mike C Code:
from PyQt4 import QtCore, QtGui |
Re: QtGui.QListWidget Question
ahhhh cheers.... the only thing i am doing different is threading mt functions... will try taking the threads out tonight and see if that helps.
|
Re: QtGui.QListWidget Question
Mike - i love you!!!!
It was a mistake in my code.... missing one character - but was so confused with so many lines i missed it! Anyway going over and over yours i finally spotted it :D - so that you very much! (Healthcheck now has touch selectors) - just being used to list, but will detect a click on them soon :D |
Re: QtGui.QListWidget Question
easily done
I'm trying to get my little app into extras dev, and it keeps crashing once installed via app manager, but works fine when I run from /opt. build 5 now, and its driving me crazy........ |
| All times are GMT. The time now is 19:32. |
Page 1 of 2 |
|
1
2
|
Next
vBulletin® Version 3.8.8