Results 1 to 3 of 3

Thread: QMainWindow in StackedWidget

  1. #1
    Join Date
    Nov 2019
    Posts
    6
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default QMainWindow in StackedWidget

    Hi,

    i have a small application made with QT and QMainWindow, and now I want to write a second one that combines this two applications.

    What I want to do is:

    - have Mainmenu in Form1
    - Button that opens Form2
    - Form2 opens in StackedWidget

    I copied all cpp/h/ui into my project folder.

    When i show the Form2 with _Form2.show(); it opens and closes in a second.

    When I use setCentralWidget than my Form2 would be displayed but no slot works.

    Compared to VB.NET: I want to have Custom-Usercontrols with all my Widgets and Code in a separate cpp/h/ui.

    Regards

  2. #2
    Join Date
    Jul 2008
    Posts
    417
    Thanks
    9
    Thanked 54 Times in 52 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMainWindow in StackedWidget

    Please show us some code.

    Ginsengelf

  3. #3
    Join Date
    Nov 2019
    Posts
    6
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default Re: QMainWindow in StackedWidget

    I have no Code yet - not for the "thing" i want to do ;-)

    FORM2 * _frm2= new FORM2;
    _frm2->show ();

    I found this to show the Form2 as second opened window - and it works.

    But i want the 2nd Window in the StackedWidget on Form1

Similar Threads

  1. QlistWidget and StackedWidget
    By cpuinthebrain in forum Newbie
    Replies: 4
    Last Post: 24th September 2012, 20:10
  2. Replies: 2
    Last Post: 15th May 2010, 15:01
  3. stackedWidget with arrows
    By Zergi in forum Newbie
    Replies: 2
    Last Post: 16th July 2008, 11:20
  4. stackedWidget
    By dragon in forum Newbie
    Replies: 3
    Last Post: 18th October 2007, 17:05
  5. StackedWidget overlapped
    By manucorrales in forum Qt Programming
    Replies: 5
    Last Post: 14th July 2006, 21:18

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.