Results 1 to 3 of 3

Thread: desing MainWindow like Qt Creator

  1. #1
    Join Date
    Jul 2015
    Posts
    21
    Thanks
    10
    Qt products
    Qt5
    Platforms
    Windows

    Default desing MainWindow like Qt Creator

    Hey guys,
    first of all english is not my first language so im sorry for my rough english.

    I want to creat a mainwindow and i got some problems to design it.
    1. How i build an application with only one window and a menu? I call "setCentralWidget" and swap with this between my widgets if the user click on a button in the menu?
    2.I want to have small menu like in the qt creater(Welcome, Edit, design...). How i realise it. There are already a class for this? Maybe i have to use the QDockWidget and modify it?


    greets

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,021
    Thanks
    280
    Thanked 818 Times in 807 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: desing MainWindow like Qt Creator

    For the menu, you can use QDockWidget (with your own custom widget inside it to contain the buttons) and use QStackedWidget as the central widget of the main window.

    Or, you can use QSplitter as the central widget and split it horizontally into the menu on the left and a QStackedWidget on the right.

    In both cases, you create new widgets for each "page" and put them into the QStackedWidget, and you use the push button clicks to switch between different widgets in the stack.

  3. The following user says thank you to d_stranz for this useful post:

    ReasyEasyPeasy (15th July 2015)

  4. #3
    Join Date
    Jul 2015
    Posts
    21
    Thanks
    10
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: desing MainWindow like Qt Creator

    thanks for this fast answer i will try it .

Similar Threads

  1. Replies: 2
    Last Post: 22nd November 2011, 00:09
  2. Replies: 0
    Last Post: 6th November 2011, 09:22
  3. Replies: 1
    Last Post: 12th April 2011, 09:53
  4. I need idea for code desing
    By The Storm in forum Qt Programming
    Replies: 6
    Last Post: 11th August 2008, 01:18
  5. Replies: 3
    Last Post: 19th October 2006, 22:13

Tags for this Thread

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.