I have:

Qt Code:
  1. //Node.cpp
  2.  
  3. #include "Node.h"
  4.  
  5. Node::Node(QWidget *parent)
  6. : QLabel (parent) {
  7. }
  8.  
  9. void Node::setName(string picName) {
  10. nodePicName = new QString(QString::fromStdString(picName));
  11. }
To copy to clipboard, switch view to plain text mode 

and then in my "Node.h" file I have:

Qt Code:
  1. class Node : public QLabel {
  2.  
  3. Q_OBJECT
  4.  
  5. public:
  6. Node(QWidget *parent = 0);
  7. virtual ~Node();
  8. void setName(string picName);
  9.  
  10. private:
  11. QString *nodeName;
  12. }:
To copy to clipboard, switch view to plain text mode 

I am getting a segmentation fault at where I have:
Qt Code:
  1. nodePicName = new QString(QString::fromStdString(picName));
To copy to clipboard, switch view to plain text mode