Page 2 of 2 FirstFirst 12
Results 21 to 21 of 21

Thread: QTabWidget with same tabs

  1. #21
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTabWidget with same tabs

    this is ridiculous
    Qt Code:
    1. void ChatWindow :: createPageList()
    2. {
    3. PageInsideTab *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10, *p11, *p12, *p13, *p14, *p15;
    4. pageList.append(p1);
    5. pageList.append(p2);
    6. pageList.append(p3);
    7. pageList.append(p4);
    8. pageList.append(p5);
    9. pageList.append(p6);
    10. pageList.append(p7);
    11. pageList.append(p8);
    12. pageList.append(p9);
    13. pageList.append(p10);
    14. pageList.append(p11);
    15. pageList.append(p12);
    16. pageList.append(p13);
    17. pageList.append(p14);
    18. pageList.append(p15);
    19. }
    To copy to clipboard, switch view to plain text mode 

    no doubt somewhere you are using one of the many uninitialised pointers here. DO NOT add meaningless pointers to your pageList.

    If you commented all use of pagelist, why did you show a function that ONLY uses pagelist?

    Warning:
    Qt Code:
    1. static int x;
    2. ++x;
    To copy to clipboard, switch view to plain text mode 
    You might get away with that, but you wont get away with
    Qt Code:
    1. int x;
    2. ++x;
    To copy to clipboard, switch view to plain text mode 

    Another major point, if you know where it is segfaulting, why aren't you getting the debugger out and looking at some variables? Learning how to debug is not optional for programmers.
    Last edited by amleto; 24th December 2011 at 12:28.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Replies: 2
    Last Post: 23rd July 2012, 08:42
  2. QTabWidget - problem with resizing
    By moowy in forum Qt Programming
    Replies: 5
    Last Post: 14th September 2006, 14:06
  3. Switching off all tabs in QTabWidget
    By Gopala Krishna in forum Qt Programming
    Replies: 7
    Last Post: 30th August 2006, 17:10
  4. Removing Tabs
    By NewGuy in forum Qt Programming
    Replies: 6
    Last Post: 22nd July 2006, 22:46
  5. Corner widget in QTabWidget doesn't show up
    By ePharaoh in forum Qt Programming
    Replies: 2
    Last Post: 6th April 2006, 17:02

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.