PDA

View Full Version : wierd issue with QComboBox in android emulator(API-13,18) and real device (API-13)



stingray
21st September 2013, 09:48
QComboBox *dropdownMenu = new QComboBox(this);

dropdownMenu->addItem(tr("Select..."));
dropdownMenu->addItem(tr("Search the DB"));
dropdownMenu->addItem(tr("Insert into DB"));

dropdownMenu->show();

QGridLayout *rootLayout = ui->gridLayout;


rootLayout->addWidget(dropdownMenu,1,1,1,1);

connect(dropdownMenu, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));



i've have a little test to add dynamic content, instead of using the designer to make static pages and jump around like a....

when i run this in linux-x86 on the desktop, it creates a working dropdown, when i click it it closes, and selects the thing i've selected (just shows a debug message for testing)

when i compile and run it on the emulator, first time, it looks normal, first click looks normal, but after first click it doesnt close the dropdown, its still open, but nonclickable, exept item 1, that one opens the dropdown again, but this time the dropdown menu, it gets sent up at the top of the screen, instead of the center place its supposed to be at where the combobox is..


now to the fun part, if i make a combobox, in designer, and more or less setup everything in the xml, then the dropdown works just the way it should, but i cant have dynamic content in it.. or well i guess i can add stuff to it but i guess that will trigger same reaction as the programatically added combobox, as i do almost the same thing to add stuff to it during runtime?

anyway heres a few screenshots from the emulator API-18

Just started (http://s18.postimg.org/czu5tzqo9/5554_HTC_Flyer_API_18_001.png)
first click to dropdown list (http://s18.postimg.org/rt8teqyfd/5554_HTC_Flyer_API_18_002.png)
first click on a item, doesnt close the dropdown (http://s18.postimg.org/q59o03kjt/5554_HTC_Flyer_API_18_003.png)
second click to dropdown and the screwd view (http://s18.postimg.org/rhrd1zhzd/5554_HTC_Flyer_API_18_004.png)

so any good ideas are welcome... i've scratching my head here dont know whats wrong.. or is it one of those, wait till Qt 5.2 is released things when android is supposed to be fully compatible?

stingray
22nd September 2013, 13:40
had me a little trip and looked at the bugtracker..

https://bugreports.qt-project.org/browse/QTBUG-32352

so its a android-bug i guess will be fixed to 5.2.x releases.. :)