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

On Windows 7, text in QTableWiget has its font change when it gets elided

XMLWordPrintable

    • 5133a1b77c059e32760f3d288c985183d86da4a

      Example code:

         QApplication app(argc, argv);
         QDialog* dialog = new QDialog;
         dialog->setStyleSheet("font-weight: normal;");
         QTableWidget* table = new QTableWidget(dialog);
         table->setRowCount(1);
         table->setColumnCount(1);
         table->setItem(0, 0, new QTableWidgetItem("abcdefg"));
         dialog->show();
         return app.exec();
      

      Resize the column so that the "abcdefg" gets elided/non-elided, and when that happens, the font changes. I don't know if this applies to other platforms, but it occurs for me on Windows 7 (with the default theme). See attached screenshot for clarification.

        1. elidedFontBug.png
          12 kB
          Dustin Smith
        2. main.cpp
          0.3 kB
          Christian Ehrlicher
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            dustinksmith Dustin Smith
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes