Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Windows Extras not working on Windows Server 2012 RC2



  • I created an app with the QWinTaskbarProgress, it's working on my Windows 10 but not in my Windows Server 2012 RC2. Ins't it compatible with that? I mean, the Windows Server 2012 has this progress indicator feature because I can see in other softwares, but it's not working with QWinTaskbarProgress.


  • Lifetime Qt Champion

    Hi,

    What do you mean by not working ?
    What version of Qt ?

    Did you check whether there's a missing dependency on your WinServer2012 for the QtWinExtras module ?



  • I'm using Qt 5.10.1, MSVC 2015. It's all there, all the dlls, I used windeployqt.

    It's just not working, on my Windows 10 it's working the progress indicator on the taskbar, however on my Windows Server 2012 RC2 it doesn't appear.


  • Lifetime Qt Champion

    I was more thinking about a subtle difference in the system libraries, hence a check with e.g. Dependency Walker on your server machine.



  • I have the Qt5WinExtras.dll in the folder, wasn't it supposed to run?


  • Lifetime Qt Champion

    As I wrote before: check the system dependencies. There might be subtleties between Windows Server 2012 (especially since it's a release candidate) and Win10.



  • Windows Server:
    0_1528060001112_9c932144-4d82-4562-9836-90d09ec10b2c-image.png

    Windows 10:

    0_1528060508208_1c8166c7-3fac-4921-aca8-5c864ae4b7a6-image.png



  • I still can't get this to work, has anyone have the same problem?


  • Moderators

    @Mr-Gisa Windows 2012 server is very different than Windows 10. I wouldn't expect that stuff made specifically for Win10 would work on 2012. In my experience it rarely does. I've come to really hate 2012 server for all the incompatibilities I've encountered.

    You may need to get a 2012 machine to build and deploy your project with. I haven't deployed much in windows (especially to 2012) so I can't offer much more advice there.



  • Hi, @ambershark is correct that Windows 2012 server is not WIndows 10, it's more or less the same as Windows 8 if you're dealing with the UI of it.

    But Qt's Windows Extras should would on all Microsoft's OS that's newer than Vista, including the QWinTaskbarProgress.
    I tested on Qt 5.110 MSVC2015 32-bit, started with an empty vanilla Widgets project, added a pushbutton to the ui and added the click slot.

    Add "winextras" to the .pro file, add these #includes to mainwindow.cpp:

    #include <QWinTaskbarButton>
    #include <QWinTaskbarProgress>
    

    and then insert this code in the clicked() slot:

    void MainWindow::on_pushButton_clicked()
    {
        static int i = 0;
    
        i += 20;
        if (i >= 100)
            qApp->quit();
    
        auto button = new QWinTaskbarButton(this);
        button->setWindow(windowHandle());
    
        auto progress = button->progress();
        progress->setVisible(true);
        progress->setValue(i);
    
        ui->pushButton->setText(QString::number(i));
    }
    

    I tested on Win7, Win8 and Win10, works ok. However I only have Windows 2012 Server R2 and not RC2 (for this it should be the same I think):
    0_1528155298019_Screenshot from 2018-06-05 01-34-13.png



  • @hskoglund Your code worked here... I understand why it's not working. It doesn't work with indeterminate progress, it only works when you set a minimum and max value and set a value to it.


Log in to reply