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

Qt-interest Archive, July 2007
qmessage box modeless


Message 1 in thread

Hi,
I want to create a Messagebox that blocks the control of the problem but not the mouse input to my main window. 
How to do it? The .show() function does not block the control, but the .exec() function blocks the mouse input
and control at the same time?

Any suggestions?







--
 [ signature omitted ] 

Message 2 in thread

What does "block the control of the problem" mean?

M

On Jul 12, 2007, at 2:38 PM, Marie-Christine Vallet wrote:

> Hi,
> I want to create a Messagebox that blocks the control of the  
> problem but not the mouse input to my main window. How to do it?  
> The .show() function does not block the control, but the .exec()  
> function blocks the mouse input
> and control at the same time?
>
> Any suggestions?
>
>
>
>
>
>
>
> --
> 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 3 in thread

Sorry about that,
I meant that this message box should block the function called and let 
me manipulate something in the main window.


Michael Simpson wrote:
> What does "block the control of the problem" mean?
>
> M
>
> On Jul 12, 2007, at 2:38 PM, Marie-Christine Vallet wrote:
>
>> Hi,
>> I want to create a Messagebox that blocks the control of the problem 
>> but not the mouse input to my main window. How to do it? The .show() 
>> function does not block the control, but the .exec() function blocks 
>> the mouse input
>> and control at the same time?
>>
>> Any suggestions? 

--
 [ signature omitted ] 

Message 4 in thread

Marie-Christine Vallet wrote:
> Sorry about that,
> I meant that this message box should block the function called and let 
> me manipulate something in the main window.
> 
> 

Thats an odd requirement. But if you know what you are doing, spin your 
own event loop for a blocking function call. Something like,

     QMessageBox box;
     box.setText("asdf");
     box.setModal(false); // modeless
     box.show();

     // blocking event loop until the messagebox is done
     QEventLoop l;
     QObject::connect(&box, SIGNAL(finished(int)), &l, SLOT(quit()));
     l.exec(); // spin event loop

Girish

--
 [ signature omitted ]