[Solved]How to avoid Gap/Space between my custom widgets ?
-
Guys help me to solve this problem.
-
"Accordion Widget":http://imageshack.us/photo/my-images/833/accordionwidget.jpg/
"Accordion Example":http://imageshack.us/photo/my-images/140/accordionexample.jpg/
"Custom Widget":http://imageshack.us/photo/my-images/521/customwidget.jpg/"Required Output":http://imageshack.us/photo/my-images/29/49828322.jpg/
To reduce Gap between the Custom Widgets ..
"Reduce Gap":http://imageshack.us/photo/my-images/341/accordionexample.jpg/ -
[quote author="sweeten" date="1336976796"]Guys help me to solve this problem.[/quote]
Somehow your pictures do not display. As far as I see, you have done it correctly.
For us it looks like this
!http://db.tt/KCdy7DMF(jpg-link)! -
-
@ Rahul
I tried setSpacing, that doesn`t works...
-
Woody
i am adding my custom widget through coding,@ widget1 = new CustomWidget();
widget1->ui->pushButton->setText("SECTION 1");
widget2 = new CustomWidget();
widget2->ui->pushButton->setText("SECTION 2");
widget3 = new CustomWidget();
widget3->ui->pushButton->setText("SECTION 3");
widget4 = new CustomWidget();
widget4->ui->pushButton->setText("SECTION 4");@How can i add Spacer to that? Thats why Rahul said to try setSpacing(),That also not works.
Thankyou for your information.
-
Aah ok, sorry for the misunderstanding.
Something like this: "QSpacerItem":http://qt-project.org/doc/qt-4.8/qspaceritem.html
I didn't really looked into it. I'm using the graphical designer do achieve this.
Hopes this works out for you.
-
Woody,
I checked QSpacerItem,there is no need for using this class, spacing can be acheived by calling the method setSpacing().So i already tried setSpacing(),this also not works.
-
I have uploaded my full project . Just run the application and see the Gap between the custom widgets(Section 1,Section 2,Section 3 & Section 4).
Your suggestions are welcome.
"Accordion Test":http://www.4shared.com/zip/rPHyPhdL/AccordionTest.html
-
Guys any suggestion..
-
I have done .Thankyou all for your support.
-
Thank you Sam for your information ,i have edited my title as Solved.