hello,
I have used QlisiWidget in my application.
I inserted items in it.
Now i want to count items which are inserted .
I used ui->listwidget->count() but it does not work..
Can any one help me...???
Thanks...
hello,
I have used QlisiWidget in my application.
I inserted items in it.
Now i want to count items which are inserted .
I used ui->listwidget->count() but it does not work..
Can any one help me...???
Thanks...
What do you mean by "doesn't work"?but it does not work..
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
hello,
I mean i think it returns 0 .
how can i make it??
Thanks..
You think?I mean i think it returns 0 .
Don't think - be sure!
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
hello,
I test it using
int i =ui->listWidget->count()
label.setText(QString(i))
And when print.It shows 0.
Is it wrong????
thanks.
You can't use QString this way.
Instead, use QString::number(i)
Read the documentation.
trupti (21st January 2011)
hello,
Thanks for reply....
I want to show all listwidgetitems in QLabel. What i want is i set images as icon in items of listwidget. and now want to display this one by one icon image in my label..
HOw can i do it???
Thanks in advance...
You can use HTML in QLabel.
Like this:
Qt Code:
myCoolLabel->setText("<img src=\"myFilePathOrResourceFilePath.extension\">");To copy to clipboard, switch view to plain text mode
Bookmarks