Results 1 to 5 of 5

Thread: Segmentation error! Please help!!!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    France
    Posts
    93
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android
    Thanked 23 Times in 22 Posts

    Default Re: Segmentation error! Please help!!!

    In your C++ instead of

    Qt Code:
    1. QLineEdit *m_addressBD=new QLineEdit;
    To copy to clipboard, switch view to plain text mode 

    Do

    Qt Code:
    1. m_addressBD=new QLineEdit();
    To copy to clipboard, switch view to plain text mode 

    Do this for all widgets, you are redeclaring locally your variable in the constructor, so in your slot m_addressBD is null and you programm crash.

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

    phapha (30th October 2011)

  3. #2
    Join Date
    Oct 2011
    Posts
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3
    Thanked 4 Times in 2 Posts

    Default Re: Segmentation error! Please help!!!

    Thank you stampede and nix. It works well now.

  4. #3
    Join Date
    Oct 2011
    Posts
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3
    Thanked 4 Times in 2 Posts

    Default Re: Segmentation error! Please help!!!

    Hi all. I'm sorry but even if I don't have the segmentation error any more, the code seems to not work. I cannot connect to the MysQL database (installed on the same computer) after clicking on connect. There is always the error message Box. I don't know if the app even try to connect to database.
    Can someone help me?

Similar Threads

  1. Segmentation error in run
    By kurrachow in forum Newbie
    Replies: 1
    Last Post: 21st April 2011, 13:13
  2. QT 4.6.0 with threads - UIC segmentation error
    By edmondo1984 in forum Installation and Deployment
    Replies: 5
    Last Post: 15th November 2010, 18:56
  3. building error: Segmentation fault
    By kaycee1 in forum Installation and Deployment
    Replies: 2
    Last Post: 21st October 2010, 10:08
  4. segmentation fault error
    By sagi in forum Installation and Deployment
    Replies: 2
    Last Post: 25th July 2008, 05:37
  5. Replies: 9
    Last Post: 6th September 2007, 08:13

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.