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. QLabel and QStatusBar. Problems with Lines
Qt 6.11 is out! See what's new in the release blog

QLabel and QStatusBar. Problems with Lines

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 2.2k Views 2 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I have some Lines i cant explain where they come from. I added 2 QLabels to a QStatusBar and got something like this
    0_1509577302095_label.png

    The Lines to the left and right of the Text are Seperators, right? i dont know. How can i remove them?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      How are you setting up that status bar ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        i have 2 QLabels in my MainWindow and a StatusBar. This is the relevant Code.

        QPixmap pixmap(":/icons/img/info.png");
                mStatusBarLabel->setPixmap(pixmap);
                mStatusBarLabel->show();
                mStatusBarText->show();
                ui->sbStatus->addWidget(mStatusBarLabel);
                ui->sbStatus->addWidget(mStatusBarText);
                mStatusBarText->setText(text);
                ui->sbStatus->setStyleSheet(
                            "QStatusBar {"
                            "background-color: green;"
                            "}");
        
        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Its a right side border style that each item in statusbar has.
          You can do

          QStatusBar::item {
              border: 0px solid red;
          }
          

          to remove it.

          ? 1 Reply Last reply
          1
          • mrjjM mrjj

            Hi
            Its a right side border style that each item in statusbar has.
            You can do

            QStatusBar::item {
                border: 0px solid red;
            }
            

            to remove it.

            ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            @mrjj it worked thanks

            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