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 withQWinTaskbarProgress
. -
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 was more thinking about a subtle difference in the system libraries, hence a check with e.g. Dependency Walker on your server machine.
-
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.
-
@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):
-
@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.