View Full Version : QGroupBox title truncated on both sides

Gopala Krishna
3rd October 2006, 15:26
hello guys,
I have a problem regarding title of QGroupBox. I have created a class which inherits QGroupBox. This class just manages the children widgets and doesn't do any painting. I just call base constructor like this.

PropertyBox::PropertyBox(const QString& title, QWidget *parent) : QGroupBox(title,parent)
layout = new QGridLayout(this);
lastRow = 0;

I could never figure out why the title of this QGroupBox is always truncated. I thought the problem was with qt and experimented with a sample example containing QGroupBox. But to my astonishment the QGroupBox was displayed properly. I also removed all *.setFont()'s from the app but it doesn't help. Even i tried with placing adjustSize() at varios places but this didnt help. You can have a look of the image attached which describes my problem.
So please can you peple help me solve this problem.

Gopala Krishna
4th October 2006, 14:59
Hello all,
Sorry , i posted the above without much experimentation. I tried to separate the above app from main app and tried qmake. It worked very well. Actually all other small parts(programs) of the main application have these problems when using custom Makefile. Even the menu width can't accomodate the whole text in it.
So, I think there is some problem with the way I compile. Hence I tried hard to match the app's Makefile with that generated by qmake. But i couldn't solve this problem.
I have attached the makefiles.
Please help me.

7th October 2006, 16:02
Solution: http://www.qtcentre.org/forum/f-qt-programming-2/t-qfontmetrics-not-giving-proper-dimension-3927.html