Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]Styling widgets of statusbar
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Styling widgets of statusbar

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mbnoimi
    wrote on last edited by
    #1

    Hello,

    As show in the screenshot you can find that all statusbar widgets have bars at left. How can I get rid of these bars?

    !http://i.share.pho.to/d84c03d5_o.jpeg(http://i.share.pho.to/d84c03d5_o.jpeg)!

    I tried to use this stylesheet but unfortunately it didn't work!
    [code]QStatusBar > QWidget {
    border: none;
    }[/code]

    BTW I added these widgets as following:
    [code]ui->statusBar->addWidget(ui->label_user);
    ui->statusBar->addWidget(ui->label_loggedAt);
    ui->statusBar->addWidget(ui->label_serverIP);
    ui->statusBar->addWidget(ui->label_analysisCount);
    ui->statusBar->addWidget(ui->label_patientsCount);
    ui->statusBar->addWidget(ui->label_todoCount);[/code]

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      You can get all the text and make it as one string and set it as status message. This way you don't have to add widget to StatusBar.

      Or you can use stylesheet like the following.

      @
      QApplication a(argc, argv);
      MainWindow w;
      w.show();
      a.setStyleSheet("QStatusBar::item { border: 0px solid black }; ");
      @

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mbnoimi
        wrote on last edited by
        #3

        thank you Dheerendra I used the stylesheet suggestion.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved