Hi,
I have a small issue with QStatusBar. It seems to have a bit bigger height than it is supposed to:
Capture.PNG
Here's the code that creates it:
abt->setDefaultAction(aboutAction);
QLabel *gridSpacingLabel
= new QLabel(tr
(" Grid Spacing: 20"));
unsavedDataLabel->setPixmap(pixmap);
statusBar()->addPermanentWidget(abt);
statusBar()->addPermanentWidget(gridSpacingLabel);
statusBar()->addPermanentWidget(xPosLabel);
statusBar()->addPermanentWidget(yPosLabel);
statusBar()->addPermanentWidget(widthLabel);
statusBar()->addPermanentWidget(heightLabel);
statusBar()->addPermanentWidget(unsavedDataLabel);
QToolButton *abt = new QToolButton(this);
abt->setDefaultAction(aboutAction);
QLabel *gridSpacingLabel = new QLabel(tr(" Grid Spacing: 20"));
QLabel *xPosLabel = new QLabel(tr(" X: 640 "));
QLabel *yPosLabel = new QLabel(tr(" Y: 640 "));
QLabel *widthLabel = new QLabel(tr(" Width: 640 "));
QLabel *heightLabel = new QLabel(tr(" Height: 480 "));
QLabel *unsavedDataLabel = new QLabel();
QPixmap pixmap(":changes.png");
unsavedDataLabel->setPixmap(pixmap);
statusBar()->addPermanentWidget(abt);
statusBar()->addPermanentWidget(gridSpacingLabel);
statusBar()->addPermanentWidget(xPosLabel);
statusBar()->addPermanentWidget(yPosLabel);
statusBar()->addPermanentWidget(widthLabel);
statusBar()->addPermanentWidget(heightLabel);
statusBar()->addPermanentWidget(unsavedDataLabel);
To copy to clipboard, switch view to plain text mode
I tried the following (separately) and other sizePolicy combinations but none seem to remove that strip at the top.
statusBar()->setMaximumHeight(20);
statusBar()->layout()->setContentsMargins(0,0,0,0);
statusBar()->setMaximumHeight(20);
statusBar()->layout()->setContentsMargins(0,0,0,0);
statusBar()->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
To copy to clipboard, switch view to plain text mode
I am looking for something like this (from Notepad++):
Capture2.PNG
Bookmarks