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

QWidget::setWindowFilePath doesn't trigger the windowTitleChanged signal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5.3
    • GUI: Window management
    • None
    • macOS

    Description

      I'm not sure if this is a bug or not but it feels like one...

      When calling QWidget::setWindowFilePath, the windowTitleChanged signal isn't triggered, even when no window title was previously set and it is updated. I've only tested this on macOS so I have no idea if this is the same on other platforms as well.

      Sample code:

       

      QWidget * theWidget = new QWidget();
      theWidget->show();
      QObject::connect( theWidget, &QWidget::windowTitleChanged, []( QStringconst & inNewTitle ){ std::cout << "New window title: " << inNewTitle.toStdString() << "\n"; } );
      // theWidget->setWindowTitle( "window title" ); // this would trigger the signal
      theWidget->setWindowFilePath( QString::fromUtf8( "/Users/QtUser/Documents/filename.txt" ) ); // this doesn't trigger the signal
      

       

      In case this helps: it looks like this worked in Qt 6.0.1 but not anymore in 6.2.2.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            gvanvoor Gregory Van Vooren
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes