Results 1 to 20 of 51

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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.


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

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

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

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

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

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


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

    Quote Originally Posted by wysota View Post
    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
    Actually i am not trying to make the listwisget 2 weeks... Lol..
    I do other thinks on the app...

  9. #9
    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 have some problems on creating the List Widget.. For once please answer me...

    I had created a List Widget.. There are five buttons.. Add,remove,remove all,move up,mode down... The add,remove and remove all buttons work perfect and do their job.. But i do not have any idea on how to make the move up button to move up the currentItem and the movedown button to move down the currentItem.. Any ideas?

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

    Use QListWidget::takeItem() to remove the item from the list and reinsert it again in the new position.
    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.


  11. #11
    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 am using this..

    ui->listWidget->takeItem(int row);

    But i do not know what exactly to replace with the int row in order the current item to move up?

  12. #12
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

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

    Qt Code:
    1. +----------+ +----------+ +----------+
    2. | | | | | |
    3. | Item 1 | | Item 1 | | Item 1 |
    4. | Item 2 | | Item 3 | | Item 3 |
    5. | Item 3 |--> item = takeItem(2) -->| Item 4 |--> insertItem(3, item) -->| Item 2 |
    6. | Item 4 | | | | Item 4 |
    7. | | | | | |
    8. +----------+ +----------+ +----------+
    To copy to clipboard, switch view to plain text mode 

  13. The following user says thank you to tbscope for this useful post:

    takechi (12th November 2010)

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, 12:54
  2. List Widget need help!
    By patrick772goh in forum Newbie
    Replies: 1
    Last Post: 15th August 2007, 10:25
  3. Creating a widget on a QGraphicsView
    By maverick_pol in forum Qt Programming
    Replies: 4
    Last Post: 9th August 2007, 17:54
  4. Stupid list widget won't clear
    By scwizard in forum Qt Programming
    Replies: 14
    Last Post: 5th July 2007, 16:03
  5. Custom widget in list view
    By fusoin23 in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2006, 14: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.