Help me on creating a List Widget...
First i want to say.. Do not give me any Class reference... I had looked many times THE class reference of listwidget and i cannot understand it...
So what i want to do is to create a list widget... Beside the listwidget i want to have four buttons... Add, Remove, Move up, Move down ....
So when i press add it will search for files and when you click open it will add the items you selected to the listwidget... When you click on an item on the listwidget and click remove the item be deleted... With move up go up an item and with move down go down an item...
But the most importand thing... What i realy want to do is the items that the listwidget have be written to a txt ( the path of this files.. and on every item a new line be created on the txt)...( Do not ask why.. I have a reason )
I now the command how to write something on a txt.. The only think i do not know is the hole thing with the listwidget..
The school is starting in 3 days so i would appresiate it if you created an example for me so i can understand it and make the app before school starts..
Re: Help me on creating a List Widget...
So basically you want us to do your work for you rather than you learning how to do it yourself?
Sorry, but that's not how we work here.
If you don't understand something, explain what you don't understand maybe we can help. Don't just say "Do this for me and don't ask why."
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
Bong.Da.City
First i want to say.. Do not give me any Class reference... I had looked many times THE class reference of listwidget and i cannot understand it...
Perhaps you could clarify what exactly is causing you grief in the documentation?
Quote:
So what i want to do is to create a list widget... Beside the listwidget i want to have four buttons... Add, Remove, Move up, Move down ....
So when i press add it will search for files and when you click open it will add the items you selected to the listwidget... When you click on an item on the listwidget and click remove the item be deleted... With move up go up an item and with move down go down an item...
That is a lot of functionality, but most of it is concerned with the signals and slots paradigm, I think. Specifically, you need to connect the clicked() signal of the various buttons to slots that manipulate the QListWidget. Most likely this will involve subclassing QListWidget.
Quote:
The school is starting in 3 days so i would appresiate it if you created an example for me so i can understand it and make the app before school starts..
Well, now I'm curious...
Re: Help me on creating a List Widget...
Do not ask why, is refer do not ask why i want to write the paths of the listwidget on a txt...
If you know how to do all of that you would created on maybe 10 minutes... And then i would take it and i would understand it... so simple..
But if you answer me with simple answers i would bomb you with many questions as it is sure i would not understand it... That's why i posted on the Newbie section...
This is a forum.. It is better not everytime i am asking a question you answer with a simple Class reference or complaing things...
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
Bong.Da.City
If you know how to do all of that you would created on maybe 10 minutes... And then i would take it and i would understand it... so simple..But if you answer me with simple answers i would bomb you with many questions as it is sure i would not understand it... That's why i posted on the Newbie section... This is a forum.. It is better not everytime i am asking a question you answer with a simple Class reference or complaing things...
I suggest that you read the following, very carefully: How to ask questions the smart way. Skip right to the introduction if you like.
Re: Help me on creating a List Widget...
What you are asking for is rather simple, and like already stated, is mostly just to throw some things on a form and connect them together with signals. To do a half-assed attempt would take maybe 15 minutes, but to do it properly as a reusable component maybe 20 - 30.
But thats not the point. You don't learn by asking other people to do what you want to do. You learn by doing it yourself.
This is a forum, true. It is idea to communicate. So please communicate what is your problem with creating the above. Where are you stuck?
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
Bong.Da.City
The school is starting in 3 days so i would appresiate it if you created an example for me so i can understand it and make the app before school starts..
Sorry, we don't do homeworks here. If anyone gives you a solution to your homework, I will personally ban them off the forum, so I wouldn't expect more than hints that will help you solve your school assignments.
BTW. It would take me 5 minutes to do what you ask, as I already have a component (or maybe two) that does most of it (apart saving to a file but that's really simple). I can even tell you the component is publically available as part of a widget set I have written. But I don't think your supervisor would be happy if you used it.
Re: Help me on creating a List Widget...
wysota why are you always so bad with me?
Me and i think every newbie would understand much easier something if you maked an example... See you can make me the example in 5 minutes... Why not to send it to me? Is this something so boring for you? Come on... And why, why if you made the example and sent it to me.. Why do you think i would not learn tehn how to use it... I wouln't just copy it but i would try to understand everything... And if i didn't understand a part of the code i would ask.....
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
Bong.Da.City
wysota why are you always so bad with me?
Me and i think every newbie would understand much easier something if you maked an example... See you can make me the example in 5 minutes... Why not to send it to me? Is this something so boring for you? Come on... And why, why if you made the example and sent it to me.. Why do you think i would not learn tehn how to use it... I wouln't just copy it but i would try to understand everything... And if i didn't understand a part of the code i would ask.....
I'm going to completely ignore the fact that you continue to not care about working on the problem in any way yourself. Instead, I'll focus on something constructive: *you still haven't asked a concrete question*. We still have no idea what about the QListWidget you don't understand. Until you can formulate a decent question, how can you possibly expect a useful answer?
I would like to add that browsing this forum makes me think of avocado. Serious discussion may now resume. :p
Re: Help me on creating a List Widget...
I think you need to re-read his message. It would take him 5 minutes because he has already done it in the past and made it a reusable component. Otherwise it would probably take 20 - 30 minutes.
But, the question still stands, for the amount of time you spend on this forum pleading that someone do your work for you, you could have done it yourself, or at least be a large portion into having it completed.
If you can't understand the first thing you must do, you are not going to understand a fully working example.
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
Bong.Da.City
wysota why are you always so bad with me?
My job here is to enforce some rules which have kept this site running for almost five years now. Don't take it personally.
Quote:
Why not to send it to me?
I would have to ban myself then and I don't think I would want to do that. I don't even know if this is technically possible.
Quote:
I wouln't just copy it but i would try to understand everything... And if i didn't understand a part of the code i would ask.....
So far you have not done anything yourself to solve your problem. I suggest you write an example and then we help you fix it, not the other way round.
Re: Help me on creating a List Widget...
I really love this thread :).
Almost whole solution for the problem has already been posted in this thread (granted using non standard widgets but he never stated that he need to use them), but he still don't get it.
Sorry for being sarcastic but Bong.Da.City I find Your attitude very rude, not only in this thread but in other as well, and did You ever thanked Anyone who gave You help? NO.
Re: Help me on creating a List Widget...
The list and button plumbing has been addressed several times.
The "write to file" requirement would just require accessing the items in the widget, in order, and writing them to file at the appropriate time (you don't tell us when that should be). Hints: QListWidget::item(), QListWidget::count() and QTextStream
When you have written something to attempt this you should be able to ask targeted questions.
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
Talei
I really love this thread :).
Almost whole solution for the problem has already been posted in this thread (granted using non standard widgets but he never stated that he need to use them), but he still don't get it.
Sorry for being sarcastic but Bong.Da.City I find Your attitude very rude, not only in this thread but in other as well, and did You ever thanked Anyone who gave You help? NO.
I do not say thanks because on this particular forum i here everytime complains and never good answers...
Anyway right now i am trying to make the AddButton.. I will post questions when i have problems...
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
Bong.Da.City
I do not say thanks because on this particular forum i here everytime complains and never good answers...
Anyway right now i am trying to make the AddButton.. I will post questions when i have problems...
You are mistaken, in this very thread You have:
src code for custom listWidget (You can easily figure out how to do what You want to do simply analysing the code),
ChrisW67 kindly posted needed classes to complete Your task (just read description of the classes/methods),
and few others ppl are willing to help You if You ask specific question (just post some code/actual problem).
And You are wrong with first statment, You should say that You don't say thanks because no one wrote finished program for YOU.
And answer to Your question is also in one of the threads here on the forum.
Re: Help me on creating a List Widget...
I do not want ready programms.. ok?
List widget is just a small part that i need for my application... Not the hole app...
I say thanks only when i solve the problem i have :) ..
Re: Help me on creating a List Widget...
Actually, looking back, the add button functionality is addressed the last time you asked this question:
http://www.qtcentre.org/threads/3371...make-a-ListBox
Re: Help me on creating a List Widget...
Quote:
Originally Posted by
ChrisW67
Wow... two weeks just to create an editable list of files (seems like a wallpaper management app)... I think I'll go to bed now :p
Re: Help me on creating a List Widget...
There are nice examples in the docs which cover your problem but you forbid to give doc references. It's a pity but I respect this.
((small side node:
Quote:
Originally Posted by
Bong.Da.City
Me and i
Ehm, is that an alarm signal of schizophrenia? Considering the red eyes of your avatar I am a little scared right now.))
@squidge: You caused me a stroke with your renaming! I thought that it couldn't be that there is suddenly a guy with more than 1500 post I never have heard of. Then finally I saw your footer. Thank heaven, I am relieved. Please, don't change your name too often!
Re: Help me on creating a List Widget...
@Lykurg: I don't plan on changing it again, don't worry :) The first name was a temporary name of which I've no idea how I thought about it. I thought it looked quite strange now so I change to match some of my other forums and looks slightly less weird :)
@Bong.Da.City: If you were not so rude when people are trying to help you, you might get better replies when you ask questions. You may also consider reading the "How to ask questions the smart way" that was pointed out above.