QMessageBox::critical on Qt Simulator using maemo view
-
I am working on a small application for mobile devices which requires login to a site. When it fails I try to use QMessageBox::critical to inform the user about the failure but instead of appearing a full screen messagebox with a critical icon, the text and the Ok button (as I expected similar to the QProgressBox) only a small rectangle appears in the top-left corner which contains the icon and the text (even the OK button is not visible). If I hit Enter it works as it should be (the small rectangle disappears and the control goes back to the login screen).
The code snippet I use is the following:
@void LoginScreen::signInFailed()
{
m_progress->reset();
QMessageBox::critical(this, tr("Failure"), tr("Sign in failed!"));
}
@Is it normal (the simulator should work this way) or I did something wrong?
-
Some "classic" dialogs are not allowed on Maemo because are not integrated. Have you seen the "Maemo 5 platform notes":http://doc.qt.nokia.com/qt-maemo-4.7/platform-notes-maemo5.html ? Seems like "QMaemo5InformationBox":http://doc.qt.nokia.com/qt-maemo-4.7/qmaemo5informationbox.html might help. I don't see the direct replacement, though.
-
Same is the case with Symbian - some are not integrated.
-
Also before you decide for another solution make sure to test on the device. The simulator is not an emulator by any stretch of imagination - it is a completely different animal that has a "maemo" skin.
-
Thanks, I had the feeling that the simulator is not 100% compatible with the device, so I try to run it there as well, and for sake of knowledge sharing I come back here and let you know what happened. I will also check QMaemo5InformationBox too (thanks for the information).
-
I've started a "page on Qt Simulator Limitations":http://developer.qt.nokia.com/wiki/Qt_Simulator_Limitations, but I don't know what else can be said.
-
In case of symbian the emulator which comes with native SDK is much better. However, its too slow. You can have a cup of tea by the time it launches in debug mode.
-
That's probably because it's an emulator isntead of simulator. The android one is also slow to load, because you even see the boot process.
-
Yes, thats right. Also when Symbian foundation was active they had plans to improve it and support it in Linux with QEMU support.
-
I have to say that the simulator is of very little use to me. When developing applications for maemo you end up using a lot of "maemo" specific/linux stuff.
Running on scratchbox is pretty good (and real) but since qt creator can publish to the actual device that has been my preferred way.
-
[quote author="QtK" date="1292191216"]Yes, thats right. Also when Symbian foundation was active they had plans to improve it and support it in Linux with QEMU support. [/quote]
I remember that, I even have it bookmarked:
"An Introduction to the Symbian Virtual Platform":http://blog.symbian.org/2009/11/20/an-introduction-to-the-symbian-virtual-platform/
"Stepping Toward Symbian Open Source Tools on Linux and Mac":http://blog.symbian.org/2010/04/21/stepping-toward-symbian-open-source-tools-on-linux-and-mac/(these links "will stop to work in just days when the Symbian foundation closes the websites":http://www.allaboutsymbian.com/news/item/12332_Symbian_Foundation_to_close_al.php)
But you said "was". Do you know if they are less interested in this now?
-
[quote author="disperso" date="1292208717"][quote author="QtK" date="1292191216"]Yes, thats right. Also when Symbian foundation was active they had plans to improve it and support it in Linux with QEMU support. [/quote]
I remember that, I even have it bookmarked:
"An Introduction to the Symbian Virtual Platform":http://blog.symbian.org/2009/11/20/an-introduction-to-the-symbian-virtual-platform/
"Stepping Toward Symbian Open Source Tools on Linux and Mac":http://blog.symbian.org/2010/04/21/stepping-toward-symbian-open-source-tools-on-linux-and-mac/(these links "will stop to work in just days when the Symbian foundation closes the websites":http://www.allaboutsymbian.com/news/item/12332_Symbian_Foundation_to_close_al.php)
But you said "was". Do you know if they are less interested in this now?[/quote]
Now it seems with Nokia taking back the control again - they might have lot of other things to work on. Also it was expected to hear some announcement on the future of SF and other such projects which were run under them. As of now no email with these clarifications have been issued in the groups.
But yes QEMU will be supported someday, but it seems will take some time now as compared to the plans SF had.
-
Meantime I have tested the application on my N900 and it worked as it was expected. So as Crochik said the simulator is not really reliable in this case. Moreover on the device the content of the LineEdit fields was not readable (text had similar or same color as the background color was).
-
The color issue probably deserve reporting a bug on JIRA.
I don't think you should count on having it fixed before you deploy your application but ...