Results 1 to 6 of 6

Thread: Problem with QHBoxlayout & QVBoxlayout

  1. #1
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Problem with QHBoxlayout & QVBoxlayout

    Hi All
    I need u ppls help. Actually i had a Dailog. I added some QPushButton and QLineEdit in different vertical layout. again while i compiled my solution an error is coming l. in my Ui_Form. its hshowing
    error C2039: 'setContentsMargins' : is not a member of 'QVBoxLayout'

    //vboxLayout->setContentsMargins(9, 9, 9, 9); getting error for this function call

    I dont know why this is coming. i'll b thankful if any body helps me.

    Regards
    Phillip
    Last edited by phillip_Qt; 12th January 2009 at 14:26.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problem with QHBoxlayout & QVBoxlayout

    QLayout::setContentsMargins() was introduced in Qt 4.3. You are using Qt Designer 4.3 or newer to design the dialog but trying to compile it with an older version of Qt.
    J-P Nurmi

  3. #3
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QHBoxlayout & QVBoxlayout

    Quote Originally Posted by phillip_Qt View Post
    Hi All
    I need u ppls help. Actually i had a Dailog. I added some QPushButton and QLineEdit in different vertical layout. again while i compiled my solution an error is coming l. in my Ui_Form. its hshowing
    error C2039: 'setContentsMargins' : is not a member of 'QVBoxLayout'

    //vboxLayout->setContentsMargins(9, 9, 9, 9); getting error for this function call

    I dont know why this is coming. i'll b thankful if any body helps me.

    Regards
    Phillip
    Quote Originally Posted by jpn View Post
    QLayout::setContentsMargins() was introduced in Qt 4.3. You are using Qt Designer 4.3 or newer to design the dialog but trying to compile it with an older version of Qt.
    Hi . thanx 4 reply. but im using Qt4.3.2 version.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  4. #4
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QHBoxlayout & QVBoxlayout

    Hi Jpn. thank u very much. But new version should support older versions feature. so how to solve this problem.?? plz tell me.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problem with QHBoxlayout & QVBoxlayout

    Quote Originally Posted by phillip_Qt View Post
    But new version should support older versions feature.
    Yes, but not vice versa. The function was introduced in Qt 4.3. It doesn't exist in Qt 4.2. You have multiple versions of Qt installed right?
    so how to solve this problem.??
    Make sure to run qmake from the correct Qt installation. What does "qmake -v" output?
    J-P Nurmi

  6. #6
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QHBoxlayout & QVBoxlayout

    Quote Originally Posted by phillip_Qt View Post
    Hi All
    I need u ppls help. Actually i had a Dailog. I added some QPushButton and QLineEdit in different vertical layout. again while i compiled my solution an error is coming l. in my Ui_Form. its hshowing
    error C2039: 'setContentsMargins' : is not a member of 'QVBoxLayout'

    //vboxLayout->setContentsMargins(9, 9, 9, 9); getting error for this function call

    I dont know why this is coming. i'll b thankful if any body helps me.

    Regards
    Phillip
    Quote Originally Posted by jpn View Post
    Yes, but not vice versa. The function was introduced in Qt 4.3. It doesn't exist in Qt 4.2. You have multiple versions of Qt installed right?

    Make sure to run qmake from the correct Qt installation. What does "qmake -v" output?

    Thank u jpn.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

Similar Threads

  1. QVBoxLayout and QHBoxLayout problem
    By fmariusd in forum Qt Programming
    Replies: 2
    Last Post: 10th January 2009, 20:58
  2. QHBoxlayout Size problem
    By Spitz in forum Qt Programming
    Replies: 2
    Last Post: 4th December 2008, 21:09
  3. Help with alignment
    By IsleWitch in forum Newbie
    Replies: 1
    Last Post: 20th October 2007, 18:20
  4. Replies: 2
    Last Post: 19th May 2007, 18:25
  5. QHBoxLayout Problem
    By Seema Rao in forum Qt Programming
    Replies: 5
    Last Post: 29th April 2006, 15:51

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.