Qt Windows Extras not working on Windows Server 2012 RC2
-
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 ?
-
wrote on 3 Jun 2018, 20:23 last edited by Mr Gisa 6 Mar 2018, 20:23
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.
-
I was more thinking about a subtle difference in the system libraries, hence a check with e.g. Dependency Walker on your server machine.
-
wrote on 3 Jun 2018, 20:31 last edited by
I have the Qt5WinExtras.dll in the folder, wasn't it supposed to run?
-
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.
-
wrote on 3 Jun 2018, 21:16 last edited by
-
wrote on 4 Jun 2018, 22:09 last edited by
I still can't get this to work, has anyone have the same problem?
-
wrote on 4 Jun 2018, 22:21 last edited by
@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.
-
wrote on 4 Jun 2018, 23:44 last edited by
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):
-
wrote on 5 Jun 2018, 07:52 last edited by Mr Gisa 6 May 2018, 08:41
@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.
11/11