Qt Code:
  1. void MagickFontDlgImpl::fillPointSizes()
  2. {
  3. int my_pointsizes[] = {4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,32,48,64,80,96,128,256};
  4. for (int j = 0; j < 28; ++j)
  5. {
  6. this->cboPoint->insertItem(QString::number(my_pointsizes[j]),j);
  7. }
  8.  
  9. this->cboPoint->setCurrentText(QString::number(this->getpsize()));
  10. }
To copy to clipboard, switch view to plain text mode 

this code sometimes gives segmentation fault. Although I made the combobox with designer and a similar combobox on the form fills up fine, this one does'nt want to be initiated.

Qt Code:
  1. comboTtf = new QComboBox( FALSE, groupBox1, "comboTtf" );
  2. comboTtf->setGeometry( QRect( 128, 71, 111, 22 ) );
  3.  
  4. textLabel2 = new QLabel( groupBox1, "textLabel2" );
  5. textLabel2->setGeometry( QRect( 11, 111, 111, 25 ) );
  6. textLabel2->setMinimumSize( QSize( 100, 25 ) );
  7. textLabel2->setBackgroundOrigin( QLabel::WidgetOrigin );
  8.  
  9. cboPoint = new QComboBox( FALSE, groupBox1, "cboPoint" );
  10. cboPoint->setGeometry( QRect( 130, 110, 110, 22 ) );
  11. cboPoint->setEditable( TRUE );
  12. layout105->addWidget( groupBox1 );
To copy to clipboard, switch view to plain text mode 

this comes from the code generated by designer.

I already cleaned the project and recompiled : no luck

I removed the combo and added a combo with the same name, the code compiled and worked, except some connections were broken. When I corrected the connections the code broke again.

How can I get a combobox in existence????

Reginald