Results 1 to 2 of 2

Thread: Access the subTab Widget in Main TabWidget

  1. #1
    Join Date
    Apr 2009
    Posts
    24
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Access the subTab Widget in Main TabWidget

    hi all, I use the following code in QDialog
    Qt Code:
    1. void Dialog::loadForm()
    2.  
    3. {
    4. ui->volumeSlider->setValue(findItem("AUDIO_LEVEL").toInt());
    5. ui->txtKeyBoad->setText(findItem("KEYBOARD_MAP"));
    6. ui->txtTimeZone->setText(findItem("TIME_ZONE"));
    7. }
    To copy to clipboard, switch view to plain text mode 
    To Access the Dialog consisting Volume Slider and Text Boxes, it Run Correctly.
    Now I switch to MainWindow Form using this code
    Qt Code:
    1. ui->general_tab->horizontalSlider->setValue(findItem("AUDIO_LEVEL").toInt());
    To copy to clipboard, switch view to plain text mode 

    it can't access the subTab
    where my maintab ObjectName is"general_tab_2" and SubTab ObjName is"general_tab"
    Please anyone who tell me that "whats the changes required in this code".
    thanks

  2. #2
    Join Date
    Feb 2008
    Posts
    98
    Thanks
    2
    Thanked 24 Times in 24 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Access the subTab Widget in Main TabWidget

    To display one of your tabs, use QTabWidget::setCurrentIndex() or QTabWidget::setCurrentWidget().

Similar Threads

  1. resizing widgets depending on a main widget size
    By luf in forum Qt Programming
    Replies: 6
    Last Post: 10th October 2009, 16:13
  2. accessing my main application window widget
    By jayw710 in forum Newbie
    Replies: 8
    Last Post: 15th November 2007, 19:33
  3. transparent background of the main widget
    By nagpalma in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2007, 17:52
  4. Replies: 4
    Last Post: 10th March 2007, 18:01
  5. closing dialog in hidden main Widget
    By Lele in forum Qt Programming
    Replies: 3
    Last Post: 6th December 2006, 10:35

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.