I'm trying to edit the source of an app called qcomicbook ( http://qcomicbook.linux-projects.net/ ), to remove an annoying 1px white border which persists in full-screen mode.
First I tried changing the background of the main window black, but it had no effect. Here is the newly compiled app against the designer preview:
I tried also setting some border and margin style information but the white border remained, so I looked at the cpp source, searched the Qt docs, and made a few simple edits, but they had no effect.
At first I thought this would be a quick cosmetic fix, but now I assume the developer could not find the cause.
He has this inside PageViewBase.cpp:
@PageViewBase::PageViewBase(QWidget *parent, int physicalPages, const ViewProperties &props)
context_menu = new QMenu(this);
connect(&this->props, SIGNAL(changed()), this, SLOT(propsChanged()));
This inside ContinuousPageView.cpp:
ContinuousPageView::ContinuousPageView(QWidget *parent, int physicalPages, const ViewProperties& props)
: PageViewBase(parent, physicalPages, props)
QWidget *w = new QWidget(this);
// w->setColor(QPalette::Background, Qt::black);
// adding above line didn't work
m_layout = new QVBoxLayout(w);
m_layout->setContentsMargins(0, 0, 0, 0);
// changing above line didn't change anything
recreatePageWidgets(); recalculatePageSizes(); setWidget(w); setWidgetResizable(true); setBackground(props.background()); setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); // track scrollbar range changes to restore its relative position connect(verticalScrollBar(), SIGNAL(rangeChanged(int, int)), this, SLOT(scrollbarRangeChanged(int, int)));
And this inside ComicMainWindow.cpp:
const int n = (sink != NULL ? sink->numOfImages() : 0);
const ViewProperties props;
view = new ContinuousPageView(this, n, props);
view = new SimplePageView(this, n, props);
setCentralWidget(view); view->setFocus(); reconfigureDisplay(); connect(actionPageTop, SIGNAL(triggered(bool)), view, SLOT(scrollToTop())); ...