Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, October 2007
Qmessagebox::information


Message 1 in thread

Is it possibile call a QMessagebox without buttons?
I try with

QMessageBoxInfo(QMessageBox::Information,qApp->translate("",""),qApp->translate("",""),QMessageBox::NoButton);

but it views Ok button.
Thanks
Teo

--
 [ signature omitted ] 

Message 2 in thread

Em Thursday 18 October 2007 09:25:51 matteo escreveu:
> Is it possibile call a QMessagebox without buttons?
> I try with
>
> QMessageBoxInfo(QMessageBox::Information,qApp->translate("",""),qApp->trans
>late("",""),QMessageBox::NoButton);

How would you get out of the message box if there are no buttons to click?

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 3 in thread

matteo wrote:
> Is it possibile call a QMessagebox without buttons?
> I try with
> 
> QMessageBoxInfo(QMessageBox::Information,qApp->translate("",""),qApp->translate("",""),QMessageBox::NoButton); 
> 
> 
> but it views Ok button.

This is intentional - QMessageBox will auto add an Ok button. It is 
possible to achieve what you want by creating a QMessageBox instance.

     QMessageBox mbox;
     mbox.setIcon(QMessageBox::Information);
     mbox.setText("whatever");
     mbox.setStandardButtons(QMessageBox::NoButton);

     // if you want Escape to cancel the dialog
     QAction *escAct = new QAction(&mbox);
     escAct->setShortcut(QKeySequence("Esc"));
     QObject::connect(escAct, SIGNAL(triggered()), &mbox, SLOT(reject()));
     mbox.addAction(escAct);

     mbox.exec();

Girish

--
 [ signature omitted ] 

Message 4 in thread

>> Is it possibile call a QMessagebox without buttons?
>> I try with
>>
>>
 QMessageBoxInfo(QMessageBox::Information,qApp->translate("",""),qApp->trans
>>late("",""),QMessageBox::NoButton);
>
>How would you get out of the message box if there are no buttons to
 click?

Escape key?

 
--
 [ signature omitted ] 

Message 5 in thread

Sorry, i not explain well.
I need a message form to show and to hide when I need (I would use for 
"loading in progress..."). Must I to design It?

Thanks
Teo


Erik Haugen Bakke wrote:
>>>Is it possibile call a QMessagebox without buttons?
>>>I try with
>>>
>>>
> 
>  QMessageBoxInfo(QMessageBox::Information,qApp->translate("",""),qApp->trans
> 
>>>late("",""),QMessageBox::NoButton);
>>
>>How would you get out of the message box if there are no buttons to
> 
>  click?
> 
> Escape key?
> 
>  
> --
> Erik H. Bakke
> 
> 
> 
> 
> 
> 
>       Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
> http://au.docs.yahoo.com/mail/unlimitedstorage.html
> 
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 6 in thread

Em Thursday 18 October 2007 10:45:58 matteo escreveu:
> Sorry, i not explain well.
> I need a message form to show and to hide when I need (I would use for
> "loading in progress..."). Must I to design It?

Well, that's definitely not the purpose for QMessageBox, as you have 
discovered yourself.

You probably want a splash screen.

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 7 in thread

Em Thursday 18 October 2007 10:36:15 Erik Haugen Bakke escreveu:
> >> Is it possibile call a QMessagebox without buttons?
> >> I try with
>
> 
> QMessageBoxInfo(QMessageBox::Information,qApp->translate("",""),qApp->trans
>
> >>late("",""),QMessageBox::NoButton);
> >
> >How would you get out of the message box if there are no buttons to
>
>  click?
>
> Escape key?

Think of the escape key as a keyboard shortcut for the Cancel button (if you 
have one).

But the question remains: how do you dismiss the dialog box with the mouse?

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 8 in thread

Sounds like you might need a QProgressDialog.

Sam Dutton


 





SAM DUTTON
SENIOR SITE DEVELOPER

200 GRAY'S INN ROAD
LONDON
WC1X 8XZ
UNITED KINGDOM
T +44 (0)20 7430 4496
F 
E Sam.Dutton@xxxxxxxxx
WWW.ITN.CO.UK

P  Please consider the environment. Do you really need to print this email?
-----Original Message-----

From: matteo [mailto:matteo.ceruti@xxxxxxxxx] 
Sent: Thursday 18 October 2007 08:26
To: qt-interest@xxxxxxxxxxxxx
Subject: Qmessagebox::information

Is it possibile call a QMessagebox without buttons?
I try with

QMessageBoxInfo(QMessageBox::Information,qApp->translate("",""),qApp->translate("",""),QMessageBox::NoButton);

but it views Ok button.
Thanks
Teo

--
 [ signature omitted ]