Results 1 to 10 of 10

Thread: tabWidget duplicate frames

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: tabWidget duplicate frames

    The explicit connect would look something like this
    Qt Code:
    1. MainWindow::MainWindow(QWidget* parent)
    2. : QMainWindow(parent)
    3. , ui(new Ui::MainWindow)
    4. {
    5. ui->setupUi(this);
    6.  
    7. connect(ui->tabWidget, &QTabWidget::currentChanged, this, &MainWindow::onCurrentTabChanged);
    8. }
    To copy to clipboard, switch view to plain text mode 
    where onCurrentTabChanged would be the function you currently have, just with a different name. Can be any valid method name in that class.

    Cheers,
    _

  2. #2
    Join Date
    Mar 2016
    Posts
    5
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: tabWidget duplicate frames

    really thank you for your patience.

    I'm sorry but I have not figured out how to attach my widget to the new tab.

    in my example the new tab windows are always empty and you do not see the widget

  3. #3
    Join Date
    Mar 2016
    Posts
    5
    Qt products
    Platforms
    Symbian S60

    Default Re: tabWidget duplicate frames

    where will you run the tab ?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: tabWidget duplicate frames

    Quote Originally Posted by ilmandorlone View Post
    I'm sorry but I have not figured out how to attach my widget to the new tab.

    in my example the new tab windows are always empty and you do not see the widget
    addTab() should do that.
    Does your widget work stand alone?
    E.g. testing as a separate window by calling serialTab->show() instead of passing it to addTab?

    Cheers,
    _

Similar Threads

  1. Qt emit keyword duplicate
    By mreyfout in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2010, 05:10
  2. duplicate recordset
    By sepehr in forum Qt Programming
    Replies: 2
    Last Post: 4th February 2009, 10:44
  3. Duplicate SLOTS
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2008, 12:32

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
  •  
Qt is a trademark of The Qt Company.