[Qt-interest] How to draw a line on the mainwindow
Alexandre Beraud
aberaud at infflux.com
Fri Feb 6 09:38:39 CET 2009
Hi,
I don't know exactly why theQt::WA_TransparentForMouseEvents attribute
is not documented and maybe not officialy supported. Anyway it's the
only way to do it as far as I know. I would add to your tutorial that
the widget should be raised() every time there is a risk that another
widget is added over it.
Best regards,
Alex
David Boddie a écrit :
> Sujan Dasmahapatra wrote:
>
>
>> I am finding some difficulty in creating a line on the mainwindow.....I
>> have the full view with a menubar,toolbar,statusbar,treeview,console
>> window and the mainwindow which is a widget from QWidget.Now I want to
>> draw a line on the main window.I tried with a class derived from QWidget
>> but that draws a line on a separate widget.But I want draw a line on the
>> mainwindow,i.e where the client will work...............How could I
>> achieve this please let me know....
>>
>
> This question keeps coming up, so I decided to write a small example that
> shows one way to do what you want - or at least what I think you want.
> You can find it on the QtCentre Wiki:
>
> http://wiki.qtcentre.org/index.php?title=Widget_Overlay
>
> If anyone feels that they could add something to the example or make
> corrections to it, please feel free to edit the page or add comments to
> the associated discussion page.
>
> David
>
--
BERAUD Alexandre
Ingénieur Développement
Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site : www.infflux.com
More information about the Qt-interest-old
mailing list