Results 1 to 9 of 9

Thread: Seg Fault

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Seg Fault

    Quote Originally Posted by giusepped View Post
    I have the following code which compiles:

    Qt Code:
    1. #include "mainwindow.h"
    2. #include <QtGui>
    3. mainWindow::mainWindow(QWidget *parent): QMainWindow(parent)
    4. {
    5. detailsText = new QTextEdit();
    6. listTable = new QTableView();
    7. mainSplitter = new QSplitter(Qt::Horizontal,this);
    8. mainSplitter->addWidget(listTable);
    9. mainSplitter->addWidget(detailsText);
    10. setCentralWidget(mainSplitter);
    11. }
    12.  
    13.  
    14. mainWindow::~mainWindow()
    15. {
    16. }
    To copy to clipboard, switch view to plain text mode 

    But the execution fires a seg fault. Why?
    Looks like the seg fault occurs while doing mainSplitter->addWidget(listTable); It would be great to see stacktrace.
    I'm a rebel in the S.D.G.

  2. #2
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Seg Fault

    How to do a stacktrace?
    g

  3. #3
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default Re: Seg Fault

    On Linux: gdb -c core <application> and then 'bt'. On Windows....who knows and cares.

Similar Threads

  1. qt-extended: Sigmentation Fault in uic.
    By zensei in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 10th March 2010, 12:56
  2. segmentation fault on mouse hover
    By elessaar in forum Qt Programming
    Replies: 6
    Last Post: 26th August 2008, 12:51
  3. Process aborted. Segmentation fault
    By Pragya in forum Qt Programming
    Replies: 3
    Last Post: 30th May 2007, 08:12
  4. Segmentation fault running any QT4 executables
    By jellis in forum Installation and Deployment
    Replies: 7
    Last Post: 19th May 2007, 16:35
  5. Icons missing => segmentation fault
    By antonio.r.tome in forum Qt Programming
    Replies: 4
    Last Post: 8th March 2006, 16:30

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.