[Qt-interest] [QtS60-feedback] How to set the menu to Qgraphicsview

Ramesh ramesh.bs at robosoftin.com
Thu Mar 11 06:38:24 CET 2010


Hi, Hamish..

Thanks..but I just want to clarify some more stuffs.

Can we add menu explicitly to application which is derived from QWidget? i.e
in case if we don't want to use mainwindow to make the application.

In mainwidow there is an option "setlayout" and "setcenterlwidget".. but if
we give the layout it does't fit only but  mainwidow is still inherited from
qwidget it should work right?
May I know the reason for why it's not taking layout?

-Br
ramesh



-----Original Message-----
From: Hamish Willee [mailto:hamishwillee at gmail.com] 
Sent: Thursday, March 11, 2010 10:54 AM
To: Ramesh
Cc: qt-interest at trolltech.com; QtS60-feedback at trolltech.com
Subject: Re: [QtS60-feedback] How to set the menu to Qgraphicsview

Hi Ramesh

My understanding is that currently in Qt only the QMainWindow can have
a menu. So if you want a menu, you HAVE to use that. In future I
understand that any top level window (not owned by another) will be
able to have menus, but don't know when that is planned.

As I recall, and I haven't played for a bit, the QDialog has default
softkeys to give you OK/back behaviour, and the sort of framework you
need for a typical dialog (ie handlers to decide whether the dialog
should quit or not). The QWidget is a pretty reasonable component on
desktop, but for most applications on Symbian its just a building
block.

To start an application I'd always use a QMainWindow if I need a menu.
Otherwise a QWidget would be fine.

Regards
H

On Thu, Mar 11, 2010 at 3:37 PM, Ramesh <ramesh.bs at robosoftin.com> wrote:
> HI, Hamish
>
> Yes I added the Graphicsview as centerl widget to window I got menu..
>
> What is the major diff b/w the Qwidget, Qmainwidow and Qdialog..
>
> I belive only windows can have menu?
>
> What if we start doing some app, we need to start wit window app or dialog
> app?
>
> What cases the Qdialog should be used?
>
>
> -----Original Message-----
> From: Hamish Willee [mailto:hamishwillee at gmail.com]
> Sent: Thursday, March 11, 2010 5:37 AM
> To: Ramesh
> Subject: Re: [QtS60-feedback] How to set the menu to Qgraphicsview
>
> I believe you can only have menus on QMainWindow in the Symbian port -
> so just add your QGraphicsView as the central widget.
>
> Regards
> H
>
> On Wed, Mar 10, 2010 at 10:33 PM, Ramesh <ramesh.bs at robosoftin.com> wrote:
>> Hi..
>>
>>
>>
>> I have Qgraphicsview, how can I add menu to Qgraphicsview?
>>
>>
>>
>> If I set the menu to Qgraphicsscene it is not showing menu.. help me out
> of
>> this
>>
>> -----------------------------------------------
>>
>> Robosoft Technologies - Come home to Technology
>>
>> Disclaimer: This email may contain confidential material. If you were not
> an
>> intended recipient, please notify the sender and delete all copies.
Emails
>> to and from our network may be logged and monitored. This email and its
>> attachments are scanned for virus by our scanners and are believed to be
>> safe. However, no warranty is given that this email is free of malicious
>> content or virus.
>>
>> --
>> List archive and information: http://trolltech.com/%(listname)s/
>>
>>
>
> -----------------------------------------------
> Robosoft Technologies - Come home to Technology
>
> Disclaimer: This email may contain confidential material. If you were not
an intended recipient, please notify the sender and delete all copies.
Emails to and from our network may be logged and monitored. This email and
its attachments are scanned for virus by our scanners and are believed to be
safe. However, no warranty is given that this email is free of malicious
content or virus.
>

-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.



More information about the Qt-interest-old mailing list