PDA

View Full Version : Qt 4.5 Embedded hangs



nickich
1st April 2009, 17:32
Hi,

This code hangs on embedded when I touch the combobox:

#include <QtGui>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget w;
QVBoxLayout bl(&w);
QComboBox pcb;
pcb.addItem("1");
pcb.addItem("2");
pcb.addItem("3");
bl.addWidget(&pcb);
bl.addStretch();
w.setLayout(&bl);
w.show();
return a.exec();
}

when I comment "pcb.addItem("x")" lines the application doesn't hang and it seems that the combobox accepts the events (seems to be redrawed). With these lines uncommented it hangs when the combo box is touched.

I noticed it hangs with QRadioButton also (instead of QComboBox), but with QPushButton - doesn't (it works).

Any ideas?
Regards,
Nikolay

Sheng
1st April 2009, 22:55
Hi,

This code hangs on embedded when I touch the combobox:

#include <QtGui>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget w;
QVBoxLayout bl(&w);
QComboBox pcb;
pcb.addItem("1");
pcb.addItem("2");
pcb.addItem("3");
bl.addWidget(&pcb);
bl.addStretch();
w.setLayout(&bl);
w.show();
return a.exec();
}

when I comment "pcb.addItem("x")" lines the application doesn't hang and it seems that the combobox accepts the events (seems to be redrawed). With these lines uncommented it hangs when the combo box is touched.

I noticed it hangs with QRadioButton also (instead of QComboBox), but with QPushButton - doesn't (it works).

Any ideas?
Regards,
Nikolay

works for me. Maybe your stack is too small? try QComboBox* pcb=new QComboBox;

nickich
2nd April 2009, 12:15
works for me. Maybe your stack is too small? try QComboBox* pcb=new QComboBox;

I tried. It's the same.
It's strange, because the QPushButton, for example, works.

BTW. What's your target? do you use tslib?
...that's what I'm thinking at the moment...