PDA

View Full Version : [SYMBIAN QT 4.7beta2] How to display messagebox at CENTRE of the screen with a button



faenil
23rd August 2010, 23:27
Hi guys I'm trying to develop an application for symbian s60 5th devices..

the application is almost ready but I have a problem...
I want to have a messagebox just like this one
http://wiki.forum.nokia.com/index.php/How_to_create_a_message_box_in_Qt_for_Symbian

which appears in the centre of the screen...

but If I create a messagebox I just get the stupid symbian popup that comes from the bottom and stops at the bottom of the screen...

can anybody help me get that messagebox in the centre of the screen?

Thanks in advance...


QMessageBox m;
m.setText("Something");
m.setInformativeText("Somethidafsdffgng");
m.move(40, 200);
m.resize(30, 40);
m.setStandardButtons(QMessageBox::Ok);

in this way I have the widget almost at the centre of the screen, but the resize() has no effect so it goes out of the screen on the right, and the OK button is still detached and it is in the bottom of the screen...

I just want to get a messagebox like the one in the link...

thanks in advance...

faenil
25th August 2010, 14:52
anyone? :)

Lykurg
25th August 2010, 22:48
I have no symbian device at the hand, so I can't check if it is possible with a standard QMessageBox, but you can create your own dialog and show it. Just subclass a QDialog add a label for text and a QDialogButtonBox.