Results 1 to 13 of 13

Thread: Numerous functions with similar names/actions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Post Re: Numerous functions with similar names/actions

    This is how you could do it with arrays:
    Qt Code:
    1. class MainWindow
    2. {
    3. ...
    4. private:
    5. QLabel* ass_labels[8];
    6. QSpinBox* ass_grade_SpinBoxes[8];
    7. QSpinBox* ass_weight_SpinBoxes[8];
    8. };
    9.  
    10. void MainWindow::show_ass(int i)
    11. {
    12. ass_labels[i]->show();
    13. ass_grade_SpinBoxes[i]->show();
    14. ass_weight_SpinBoxes[i]->show();
    15. }
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    kramed (14th August 2007)

  3. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Numerous functions with similar names/actions

    Lots of asses in there...

  4. #3
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Default Re: Numerous functions with similar names/actions

    Marcel,
    do you mean if convert ass to horse then it work fine...ha..ha..ha..

    do you know how to convert ass to horse??
    .
    .
    .
    .
    ans: just multiply by horse/ass.

  5. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Numerous functions with similar names/actions


    I think a moderator will delete the last two posts.
    The show_ass function is ambiguous.

    Regards

  6. #5
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Default Re: Numerous functions with similar names/actions

    marcel,
    it is just a coding, it is a sort name of somthing, but you made it ambiguous.
    I request to moderator to delete the last four posts including my this post also.

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

    Default Re: Numerous functions with similar names/actions

    Quote Originally Posted by marcel View Post
    I think a moderator will delete the last two posts.
    Why should we?

  8. #7
    Join Date
    Aug 2007
    Location
    Ontario, Canada
    Posts
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    4

    Default Re: Numerous functions with similar names/actions

    Thank you jpn. That will help greatly.

    show_ass stands for show_assignments. I didnt think people would get such a rouse out of it, haha.

  9. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Numerous functions with similar names/actions

    Quote Originally Posted by kramed View Post
    Thank you jpn. That will help greatly.

    show_ass stands for show_assignments. I didnt think people would get such a rouse out of it, haha.
    It is still funny.

    Quote:
    Originally Posted by marcel
    I think a moderator will delete the last two posts.

    Why should we?
    They have nothing to do with the original question...


    Regards

  10. #9
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Talking Re: Numerous functions with similar names/actions

    marcel,
    I saw that JPN answer was correct so I replyed your funny thing only.
    it look like you are funny guy and enjoying while programming. good carryon..
    but dont make more fun on this that make bad.

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
  •  
Qt is a trademark of The Qt Company.