PDA

View Full Version : Draw line on Mainwindow



sujan.dasmahapatra
5th February 2009, 07:47
Dear Friends
I have my application with the mainwindow or mainwidget which is a QWidget * widget, the menubar,toolbar,statusbar,treeview,console window etc.........So I want to draw a line on the mainscreen or on the mainwindow or on the mainwidget which is QWidget *widget.................I have tried by defining a class derived from QWidget and by implementing the paintEvent function from QPaintEvent but that is drawing on a seperate widget being appeared on the mainwindow....but I want to draw on the mainwindow.how could I achieve this. Please someone help me ..........I am stuck.......I am using LINUX Qt..........Thanks...

aamer4yu
5th February 2009, 09:54
Why dont you inherit QMainWindow and re-implement its paintEvent function ?
and it wud be good if u tell us what u exactly want to do, or show what u have tried till now

NOTE: Please avoid posting same thing in different threads.