PDA

View Full Version : Problem with QHBoxlayout & QVBoxlayout



phillip_Qt
12th January 2009, 12:52
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

jpn
12th January 2009, 18:23
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.

phillip_Qt
13th January 2009, 03:38
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


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.

phillip_Qt
13th January 2009, 05:40
Hi Jpn. thank u very much. But new version should support older versions feature. so how to solve this problem.?? plz tell me.

jpn
13th January 2009, 07:33
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?

phillip_Qt
13th January 2009, 10:26
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


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.