Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-31600

QSS: "border: 1px dashed" property produces wrong border type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.0.1, 5.7.0
    • GUI: Painting
    • Windows 7, Windows XP.

    Description

      I want to make a button border dashed, but when I use the following property:

      border: 1px dashed black;

      I get dotted border instead.
      I have attached the screen-shot and code example for reproducing the problem.
      I have searched, but can not find similar bugs, but sorry for possible duplications.

      Could you please advice me something?
      Thanks.

      Bar.c++
      #include <QApplication>
      #include <QMainWindow>
      #include <QPushButton>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          QMainWindow window;
          auto button = new QPushButton(&window);
          button->setStyleSheet("border: 1px dashed black;");   // Will produce DOTTED border instead.
          //button->setStyleSheet("border: 2px dashed black;"); // OK - dashed border, but I need 1px width.
          window.show();
      
          return app.exec();
      }
      

      Attachments

        1. dashedBug.png
          dashedBug.png
          15 kB
        2. main.cpp
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            darkeld3r Stanislav Tkach
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes