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

QGroupBox title does not follow alignment with fusion style

    XMLWordPrintable

Details

    • eb786d600cf0b994089dacd7e2ed9a02b1ac0552 (qtbase/5.6, 22.4.2016,5.6.1)

    Description

      Bug can be reproduced with Qt's Basiclayouts example (Examples\Qt-5.5\widgets\layouts\basiclayouts).

      QGroupBox is created on dialog.cpp Dialog::createFormGroupBox(). If you add an alignment it works ok (=group box title is placed on basis of the alignment) with the default style but not with the fusion style.

      void Dialog::createFormGroupBox()
      {
          formGroupBox = new QGroupBox(tr("Form layout"));
          // Added alignment; works with the default style but not with fusion style
          formGroupBox->setAlignment( Qt::AlignHCenter );
      

      Fusion style can be set on main.cpp:

      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          // added the fusion style:
          QApplication::setStyle(QStyleFactory::create("Fusion"));
      

      Attachments

        1. qtbug49068.jpg
          qtbug49068.jpg
          13 kB
        2. qtbug49068.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            tarjasundqvist Tarja Sundqvist
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes