View Full Version : QMessageBox problem in Qtopia

6th February 2008, 12:56
I have a problem with QMessageBox in qtopia.
I wrote a small test app where I create a button. Clicking on it will result in a QMessageBox with an Ok button popping up.
This works fine when i use
QApplication but when I use QtopiaApplication the QMessageBox is not displayed properly. I tried resizing, setGeometry etc stuff but it does not work :(. I have to explicitly right click on the QMessageBox titlebar and close it :( QMessageBox::exec() returns 0.
I am attaching snapshots of both the images for comparision.
I use Qtopia 4.3.0. Please help me :(

7th February 2008, 12:18
There is nothing in the docs that would suggest it shouldn't work. Does the same happen for example applications bundled with Qtopia? If so, I suggest reporting a bug.

7th February 2008, 14:41
Hi Wysota
in qtopia-core-src-4.3.0 i could not find any example applications which use QMessageBox. There are, but they are defined to be sharedlibs, so I could not execute them to find out.
I am posting my test source code here. May be I did something really stupid :confused:
request you to please check it out once :o


7th February 2008, 14:45
btw forgot to mention
the QMessageBox::exec() return 1024:

QMessageBox::Close 0x00200000 A "Close" button defined with the RejectRole.


8th February 2008, 10:14
Wanted to notify that I made it work.
I actually did a make install and viewed the application from the qtopia emulator and there i see the QMessageBox fine (as a frame at the bottom ofthe screen) along with the Ok at right_soft_key.
Guess QMessageBox is qtopia is defined to operate based on soft keys for the StandardButton::Ok and so may not be working correctly when used with Qvfb.
A good lesson, that may be I should compulsorily work on the emulator directly rather than just on Qvfb as a direct shortcut.
But then, I do not know the truth :D so may be, if indeed there is still something wrong here with my assumption, please guide me :confused:


8th February 2008, 10:22
An update, just now came to know that it works fine with just qvfb configured to take key input!!! there also, it operates using the right_soft_key.
guess I was being stupid after all :(