[Qt-interest] [Fwd: Creating a Border to Desktop]
Rahulkumar Tibdewal
rahulkumar_tibdewal at persistent.co.in
Mon Oct 26 15:05:54 CET 2009
Hello Raja I have separated two widgets.
I am having problem creating a widget with title bar similar to one shown in figure
Can you help in it?
Thanks
Rahul
From: Raja Rokkam [mailto:rokkamraja at gmail.com]
Sent: Monday, October 26, 2009 4:42 PM
To: Rahulkumar Tibdewal
Cc: s.rosellini at iv-srl.it; QT Mailing LIST
Subject: Re: [Qt-interest] [Fwd: Creating a Border to Desktop]
Hi Rahul,
Firstly, you want a border around the Desktop Screen is
Secondly, you need a widget at top left corner of screen which has some buttons and shouldnt move around or should be cooupled with the 1st widget.
I would like to keep my design as 2 separate widgets one for just drawing the borders around screen or in future around other applications on desktop and 2nd widget as a title bar as this will allow code modularity but at a lil work from your side.
Some of questions I have are: is title bar movable ? can it move separately and if it can move should the whole paint border move ? In that case you need to override the mousePressEvent and mouseMoveEvent.
If title bar is immovable then it should be pretty simple to implement.
Also, if you want you can keep the 2 widgets as part of a parent widget which will be transparent to mouse events as well.
Let me know if you have any concerns or misunderstood the question.
-Raja.
On Mon, Oct 26, 2009 at 4:22 PM, Rahulkumar Tibdewal <rahulkumar_tibdewal at persistent.co.in<mailto:rahulkumar_tibdewal at persistent.co.in>> wrote:
Hello Raja/ Stefano,
UI Requirement has been modified as mentioned in picture above.
I have posited a question on list but did not got any kind of answer, so I am addressing the problem .
Using this call setAttribute(Qt::WA_TransparentForMouseEvents); makes title bar buttons useless, I fact now we need some portion to accept mouse events and rest don't.
Next challenge is to create a Title bar, as shown above in figure.
Title bar is actually very small and widget is of the size of desktop. Plus there is only one button for close and no other buttons for minimize and maximize.
Apart from it, widget also has some area which is not transparent to mouse events and is visible, where I can have buttons.
Any suggestions and help would be highly appreciated.
Thanks,
Rahul
From: qt-interest-bounces at trolltech.com<mailto:qt-interest-bounces at trolltech.com> [mailto:qt-interest-bounces at trolltech.com<mailto:qt-interest-bounces at trolltech.com>] On Behalf Of Raja Rokkam
Sent: Thursday, October 22, 2009 7:56 PM
To: s.rosellini at iv-srl.it<mailto:s.rosellini at iv-srl.it>
Cc: QT Mailing LIST
Subject: Re: [Qt-interest] [Fwd: Creating a Border to Desktop]
Forgot telling you to create your own QWidget class and do these changes over there so that it makes ur life easier.
On Thu, Oct 22, 2009 at 7:54 PM, Raja Rokkam <rokkamraja at gmail.com<mailto:rokkamraja at gmail.com>> wrote:
create a QWidget and get screen geometry using QDesktopWidget.
Set this flags:
setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_TransparentForMouseEvents);
and if you want to draw a border jus override the paint events and create a QPainter object in it and just paint the border.
-Raja.
On Thu, Oct 22, 2009 at 7:50 PM, Stefano Rosellini <s.rosellini at iv-srl.it<mailto:s.rosellini at iv-srl.it>> wrote:
Take a look to QWidget::setMask to create a widget with "holes" and QDesktopWidget to get desktop geometry.
Hello All,
I am creating a widget which has following requirements.
1. Widget covers an entire screen. Like full screen.
2. Thick blue border.
3. Widget is such that I can see UI in the background. .i.e. I can see my desktop.
To summarize this, it's like putting a border on your desktop. One can also consider it as creating a Frame for a desktop.
Any help is highly appreciated.
Thanks
Rahul
DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
--
Stefano Rosellini
Informatica Valdinievole
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com<mailto:Qt-interest at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-interest
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com<mailto:Qt-interest at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-interest
DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091026/abe60a87/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Expected UI.PNG
Type: image/png
Size: 9137 bytes
Desc: Expected UI.PNG
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091026/abe60a87/attachment.png
More information about the Qt-interest-old
mailing list