Results 1 to 4 of 4

Thread: A QComboBox item produces segmentation fault when used

  1. #1
    Join Date
    Jan 2009
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11

    Arrow A QComboBox item produces segmentation fault when used

    OS: Ubuntu Linux 8.10 x64

    QT version: 4.4.3


    I have a problem using a QComboBox, it produces a segmentation fault when accessed.

    I have created a simple application that reproduces the problem, and I have uploaded the source code at my site:

    http://www.cpp-software.net/temp/test.zip


    Any help will be greatly appreciated!

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: A QComboBox item produces segmentation fault when used

    add this line and enjoy!
    Qt Code:
    1. Test(QWidget *parent= 0):QMainWindow(parent)
    2. {
    3. setupUi(this);//<--- this
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: A QComboBox item produces segmentation fault when used

    btw, remove ";" from this line
    Qt Code:
    1. ...
    2. if(app.exec()!= 0)
    3. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    Jan 2009
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: A QComboBox item produces segmentation fault when used

    OK, thank you both.

Similar Threads

  1. Segmentation fault running any QT4 executables
    By jellis in forum Installation and Deployment
    Replies: 7
    Last Post: 19th May 2007, 16:35
  2. Cannot select an item in QComboBox
    By Declan in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2007, 08:08
  3. Segmentation fault in QListViewItem
    By ederbs in forum Qt Programming
    Replies: 2
    Last Post: 26th November 2006, 01:19
  4. segmentation fault insert QString in QCombobox
    By regix in forum Qt Programming
    Replies: 16
    Last Post: 8th August 2006, 08:46
  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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.