Results 1 to 2 of 2

Thread: I can't see the widgets defined in the tab pages.

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default I can't see the widgets defined in the tab pages.

    QList areas;
    QListpages;

    class CTabWig : public QTabWidget
    {
    Q_OBJECT
    public:
    CTabWig() ;
    ~CTabWig() { }
    };

    CTabWig::CTabWig() {

    for(int i=0; i<10; i++)
    {
    areas.append(new QScrollArea(this));
    addTab(areas.at(i),names.at(i));
    pages.append(new QWidget(areas.at(i)));
    areas.at(i)->setWidget(pages.at(i));
    }

    }
    //////////////////////////////////////////////////////////////////////////////////////////
    where names.at(i) are some QStrings generated...they have valid value.

    But I cannot see any widgets that are defined in the pages. In these pages I have many widgets defined. Ican't see them only I can see the tabs with thei names. Whats wrong in this can anyone help me pls. Thanks sujan

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: I can't see the widgets defined in the tab pages.

    try adding a visible widget like QPushButton (not just QWidget), a QWidget does paint anything

Similar Threads

  1. print several pages
    By beirrascan in forum Newbie
    Replies: 1
    Last Post: 8th November 2010, 22:26
  2. QTableView with pages
    By sysmaniac in forum Newbie
    Replies: 1
    Last Post: 4th November 2010, 18:11
  3. Qtabwidget: same widgets across all pages
    By ike in forum Qt Programming
    Replies: 1
    Last Post: 1st October 2009, 14:30
  4. Creating pages
    By hgedek in forum Qt Programming
    Replies: 1
    Last Post: 19th July 2007, 15:11
  5. adding widgets to tabWidgets pages
    By quickNitin in forum Newbie
    Replies: 1
    Last Post: 23rd November 2006, 09:59

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.