Wait a minute. QTextBrowser is already scrollable. What's the point placing it inside a QScrollArea?
Wait a minute. QTextBrowser is already scrollable. What's the point placing it inside a QScrollArea?
J-P Nurmi
I have lots of other custom widgets and a tab widget in the scroll area. The text widget is inside of the tab widget. The example that I gave you is just a minimized version of what I do to duplicate the problem.
I just substituted the following code in MainWidget.cpp to use a QLabel instead of QTextBrowser and I still see the problem:
Qt Code:
scrollArea_->setWidget(label); label->setText("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n");To copy to clipboard, switch view to plain text mode
Turns out the culprit was the fact that I had:
Qt Code:
setStyleSheet("background-color: rgb(240,240, 240)");To copy to clipboard, switch view to plain text mode
in the mainDialog.cpp
This propagated to widgets that cannot be styled this way. In order to style the scrollbar, it looks like I am going to have to style each part of the scrollbar.
stylesheet description for scrollbar
I was hoping that I could set the color of my entire application in one call but it looks like I am going to have to be a little more detailed than that.
Bookmarks