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

QWinTaskbarButton documentation should mention windowHandle() not working from constructor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.5.1
    • 5.4.2
    • Extras: Win
    • None
    • Compilation is 5.4.2 from the mxe.cc project (meaning a mingw cross compiler on Linux).
    • 1ce490ca9279d60ab404310fa00c91863b06c3ab (qtwinextras/5.5, 8.7.2015)

    Description

      The taskbar button requires the window handle to be set with a call to button->setWindow(mainWin->windowHandle()). This doesn't work if it's called from mainWin's constructor.

      It's possible it doesn't work until mainWin itself has been shown.

      See http://stackoverflow.com/questions/25916966/what-am-i-doing-wrong-with-qwintaskbarprogress

      Neither the documentation for QWinTaskbarButton (neither the example code nor QWinTaskbarButton::setWindow()) nor the documentation for QWidget::windowHandle() mentions anything about this.

      Figuring this out the hard way is very difficult and time-consuming.

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            mbunkus Moritz Bunkus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes