Results 1 to 2 of 2

Thread: Draw line on Mainwindow

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Unhappy Draw line on Mainwindow

    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...

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Draw line on Mainwindow

    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.
    Last edited by aamer4yu; 5th February 2009 at 09:19.

Similar Threads

  1. QTcpSocket exception.
    By Fastman in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2008, 13:51
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  3. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 09:16
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.