Results 1 to 5 of 5

Thread: Simple program segfaults. QListView? Out of ideas.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Simple program segfaults. QListView? Out of ideas.

    Why would you like to add to the layout after the widget is after the dialog is shown?
    In your particular case everything will happen so fast you won't see the "empty" dialog anyway.

    If you really need to show half of the dialog and the rest sometime after, you can add all the widgets to layout and specifically hide the ones you don't want and then show them later.

    And follow stampede's advice and create widgets on the heap.

    //your code doesn't crash on Windows with Qt 4.7.2 - i can't test on Linux at the moment

  2. #2
    Join Date
    Mar 2011
    Posts
    3
    Qt products
    Platforms
    Unix/X11

    Default Re: Simple program segfaults. QListView? Out of ideas.

    I didn't think the order would make a difference, and once I saw it could crash I wanted to know why. However, now I can see the order affects how the dialog is sized.

Similar Threads

  1. Debugging error of a simple program
    By Professor widget in forum Newbie
    Replies: 5
    Last Post: 11th February 2011, 23:24
  2. Simple C/C++ program
    By ct in forum General Programming
    Replies: 4
    Last Post: 25th October 2007, 14:11
  3. how to use progressBar in simple program
    By jyoti in forum Newbie
    Replies: 1
    Last Post: 1st December 2006, 12:16
  4. Writing a simple Draw program
    By neomax in forum General Discussion
    Replies: 1
    Last Post: 23rd November 2006, 06:53
  5. Release my simple program to other users ?
    By probine in forum Qt Programming
    Replies: 9
    Last Post: 9th July 2006, 23:42

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.