Results 1 to 2 of 2

Thread: Why does setTextColor() cause a segfault?

  1. #1
    Join Date
    Feb 2006
    Posts
    47
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Why does setTextColor() cause a segfault?

    A line such as:

    DICOM_Information__Patient_Information__Name->setTextColor(1,Qt::black);

    where DICOM_Information__Patient_Information__Name is a
    QTreeWidgetItem, should not cause a seg fault. Why does it do so then?I am quite sure that DICOM_Information__Patient_Information__Name is valid, so why does this happen?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Why does setTextColor() cause a segfault?

    Maybe it's a null pointer after all? Or maybe a dangling pointer? Maybe you access it from non-GUI thread? Or it has only one column?

Similar Threads

  1. Segfault in Construkctor of QCoreApplication?!?
    By schulze in forum Qt Programming
    Replies: 1
    Last Post: 6th November 2008, 11:50
  2. QwtPlotMarker segfault
    By viridis in forum Qwt
    Replies: 4
    Last Post: 17th September 2008, 13:22
  3. Segfault when retrieving info from QSettings
    By codeslicer in forum Qt Programming
    Replies: 21
    Last Post: 21st March 2008, 08:42
  4. Segfault
    By Dumbledore in forum Qt Programming
    Replies: 3
    Last Post: 12th November 2007, 07:31
  5. segfault
    By conexion2000 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2006, 12:34

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.