Page 1 of 3 123 LastLast
Results 1 to 20 of 51

Thread: Help me on creating a List Widget...

  1. #1
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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..

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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."

  3. #3
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by Bong.Da.City View Post
    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?

    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.

    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...

  4. #4
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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...

  5. #5
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by Bong.Da.City View Post
    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.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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?

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by Bong.Da.City View Post
    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.
    Last edited by wysota; 9th September 2010 at 23:25.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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.....

  9. #9
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by Bong.Da.City View Post
    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.

  10. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by Bong.Da.City View Post
    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.

    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.

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default 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.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

  13. #13
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default 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.

  14. #14
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by Talei View Post
    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...

  15. #15
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by Bong.Da.City View Post
    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.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

  16. #16
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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 ..

  17. #17
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default 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

  18. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Help me on creating a List Widget...

    Quote Originally Posted by ChrisW67 View Post
    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
    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
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  19. #19
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default 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 View Post
    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!

  20. #20
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

Similar Threads

  1. How can I create a widget list as Qt Designer?
    By ricardo in forum Qt Programming
    Replies: 5
    Last Post: 3rd May 2009, 13:54
  2. List Widget need help!
    By patrick772goh in forum Newbie
    Replies: 1
    Last Post: 15th August 2007, 11:25
  3. Creating a widget on a QGraphicsView
    By maverick_pol in forum Qt Programming
    Replies: 4
    Last Post: 9th August 2007, 18:54
  4. Stupid list widget won't clear
    By scwizard in forum Qt Programming
    Replies: 14
    Last Post: 5th July 2007, 17:03
  5. Custom widget in list view
    By fusoin23 in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2006, 15:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.