修改QSTATUSBAR小部件后面的线路
有没有一种方法可以修改(删除)QSTATUSBAR中永久小部件后面的线路?
我不知道它是否重要,但这就是我将标签添加到状态栏中的方式:
wStyleTest::wStyleTest(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::wStyleTest)
{
// ...
ui->statusbar->addPermanentWidget(ui->lblPermWidget1);
ui->statusbar->addPermanentWidget(ui->lblPermWidget2);
// ...
Is there a way to modify (remove) the line behind a permanent widget in a QStatusbar?
I don't know if it's important, but that's how I added the labels to the status bar:
wStyleTest::wStyleTest(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::wStyleTest)
{
// ...
ui->statusbar->addPermanentWidget(ui->lblPermWidget1);
ui->statusbar->addPermanentWidget(ui->lblPermWidget2);
// ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
子类
qproxystyle
并重新实现drawprimitive
方法。在那里,检查QSTYLE :: PE_FRAMESTATUSBAR
元素,然后从中返回而不是调用基本方法。将其应用于Main.cpp或MainWindow的构造函数中:
Subclass
QProxyStyle
and reimplement thedrawPrimitive
method. In there, check for theQStyle::PE_FrameStatusBar
element and return from it instead of calling the base method.Apply it to your app either in your main.cpp or constructor of MainWindow: