Results 1 to 4 of 4

Thread: QWdiget to QmainWindow

  1. #1
    Join Date
    Apr 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QWdiget to QmainWindow

    Hi,
    I have finalized an app as a QWidget. I want to add a menu and wonder which is the easiest way to do this.
    Can I convert QWidget to QMainWindow easy?
    /Thomas

  2. #2
    Join Date
    Jul 2010
    Location
    Indonesia
    Posts
    83
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: QWdiget to QmainWindow

    Can I convert QWidget to QMainWindow easy?
    Sure, you can! Just change your widget parent class / superclass from QWidget to QMainWindow. Don't forget to change your constructor too.

  3. #3
    Join Date
    Apr 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QWdiget to QmainWindow

    Ok thanks!
    But how do I change the constructor?
    /Thomas

  4. #4
    Join Date
    Jul 2010
    Location
    Indonesia
    Posts
    83
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: QWdiget to QmainWindow

    That is optional. If your constructor calling QWidgetconstructor, you have to change it.
    ~ We are nothing in this universe ~

Similar Threads

  1. QMainWindow as a child of QMainWindow
    By Elder Orb in forum Qt Programming
    Replies: 8
    Last Post: 12th February 2011, 21:31
  2. [SOLVED] QMainWindow open a new QMainWindow
    By xeroblast in forum Qt Programming
    Replies: 1
    Last Post: 2nd December 2010, 07:31
  3. Replies: 0
    Last Post: 17th November 2010, 17:07
  4. QMainWindow
    By franco.amato in forum Qt Programming
    Replies: 7
    Last Post: 18th December 2009, 17:45
  5. QMainWindow
    By Vani in forum Qt Tools
    Replies: 2
    Last Post: 23rd April 2008, 11:39

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.