Results 1 to 2 of 2

Thread: Layout setting

  1. #1
    Join Date
    Apr 2011
    Posts
    12
    Qt products
    Qt3
    Platforms
    Symbian S60

    Default Layout setting

    hello sir

    i am new to QT..actually i contructed a calenderWidget in qt using coding not by using qtdesginer...now my problem is that i can't manage the widget to properly display in stimulator...means i cant able to manage layout by using cooding..

    centralWidget=new QWidget();
    calenderWidget=new QCalendarWidget();
    calenderWidget->setGridVisible(true);
    calenderWidget->show();



    QHBoxLayout *hLayout=new QHBoxLayout();
    hLayout->addWidget(calenderWidget);

    hLayout->addSpacing(24);
    hLayout->addStretch(1);;

    centralWidget->setLayout(hLayout);
    setCentralWidget(centralWidget);

    so can u post me a code so that i can layout the widget without using qtdesigner..

    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Layout setting

    now my problem is that i can't manage the widget to properly display in stimulator...means i cant able to manage layout by using cooding..
    What does it means?
    Can you post a screenshot of your MainWindow?
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Replies: 0
    Last Post: 12th December 2010, 05:09
  2. Problem setting central Widget layout
    By frenk_castle in forum Newbie
    Replies: 2
    Last Post: 26th September 2009, 16:43
  3. Replies: 0
    Last Post: 25th May 2009, 10:00
  4. Setting layout margin and spacing globally
    By aarpon in forum Qt Programming
    Replies: 0
    Last Post: 7th April 2009, 12:23
  5. Replies: 7
    Last Post: 15th June 2007, 16:13

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.