Results 1 to 3 of 3

Thread: Add a Frame Widget to the main window

  1. #1
    Join Date
    Mar 2010
    Posts
    54
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default Re: Add a Frame Widget to the main window

    Hi All

    I have a issue where I need to add a framewidget to the mainwindow.I am writing the following code
    But when I execute, the frame doesnt get displayed
    /************************************************** *****************************/
    FrameDisplay* display = new FrameDisplay;
    QGridLayout* layout = new QGridLayout;
    layout->setGeometry(20,140,231,300);
    layout->addWidget(display);
    display->show();
    setLayout(layout);
    /************************************************** *******************************/


    Added after 25 minutes:


    I need to have a image like the one thats attached
    Attached Files Attached Files
    Last edited by kamlmish; 30th November 2010 at 08:50.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Add a Frame Widget to the main window

    What is FrameDisplay?
    Where is the attached image?

  3. #3
    Join Date
    Mar 2010
    Posts
    54
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default Re: Add a Frame Widget to the main window

    The FrameDisplay class is declared below

    /************************************************** ************/
    class FrameDisplay: public QFrame
    {
    public:
    FrameDisplay(QWidget* parent = 0);
    ~FrameDisplay();
    public:
    void DragEnterEvent(QDragEnterEvent* event);
    void dropEvent(QDropEvent *event);
    void mousePressEvent(QMouseEvent *event);

    };
    /************************************************** *************/

Similar Threads

  1. Replies: 0
    Last Post: 14th November 2010, 19:38
  2. Replies: 11
    Last Post: 11th August 2008, 09:14
  3. accessing my main application window widget
    By jayw710 in forum Newbie
    Replies: 8
    Last Post: 15th November 2007, 19:33
  4. Main Window frame height
    By ^NyAw^ in forum Qt Programming
    Replies: 18
    Last Post: 13th November 2007, 12:14
  5. Background image for main window widget using css.
    By Enygma in forum Qt Programming
    Replies: 8
    Last Post: 23rd August 2007, 15:40

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.