Results 1 to 6 of 6

Thread: [SOLVED] QLabel and Segmentation fault...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QLabel and Segmentation fault...

    for safety you add following which I added in blue

    MyGraphicView::MyGraphicView(QWidget *parent) :
    QWidget(parent),info_filesize(NULL)
    {
    [...]
    info_filesize = new QLabel(this);
    [...]
    info_filesize->setText("KB"); // <- works!!!
    }

    void MyGraphicView::updateImageInformation()
    {
    if(info_filesize)
    info_filesize->setText("----"); // <- SIGSEGV
    }

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

    Lykurg (4th October 2007)

Similar Threads

  1. Replies: 2
    Last Post: 19th May 2007, 18:25
  2. segmentation fault insert QString in QCombobox
    By regix in forum Qt Programming
    Replies: 16
    Last Post: 8th August 2006, 08:46

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.