Results 1 to 2 of 2

Thread: Accessing SubTabs in Main Tab

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

    Default Accessing SubTabs in Main Tab

    hi all, I use the following code in QDialog
    Qt Code:
    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:
    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
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Accessing SubTabs in Main Tab

    I'm sorry but do you expect us to guess how your objects are organized?

    I would say you are missing the parenthesis after "horizontalSlider" but only provided that "general_tab" is a widget that has a horizontalSlider() method.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 9th August 2009, 22:08
  2. Accessing deleted memory, Producer Consumer app
    By ^NyAw^ in forum General Programming
    Replies: 3
    Last Post: 2nd August 2008, 13:58
  3. accessing my main application window widget
    By jayw710 in forum Newbie
    Replies: 8
    Last Post: 15th November 2007, 19:33
  4. Replies: 4
    Last Post: 10th March 2007, 18:01
  5. Replies: 3
    Last Post: 31st March 2006, 18:38

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.