QT UWP and Qt Widget



  • Hi,
    maybe a stupit question but is it possible to run a normal Qt Widget application with UWP. For example to use bluetooth but still have the "old" widget application?


  • Qt Champions 2018

    @Craftplorer It is possible.
    See https://doc.qt.io/qt-5/winrt-support.html
    You need to use Visual Studio compiler and WinRT Qt version.



  • Thank you. Im not sure how. I can run Qt application with MSVC and QML but not with Qt Widget any instruction on how to configure this?


  • Qt Champions 2018

    @Craftplorer said in QT UWP and Qt Widget:

    but not with Qt Widget

    I don't develop for WinRT. What happens if you try to create a widgets project with WinRT Kit?



  • Oh is there a difference betwenn WinRT kit and the default UWP kit?
    How do I create a WinRT kit?

    Currently I use the UWP kit with the widget project and it start a "typical" blank uwp window not the standart windows window and i get following messages on the Application Output:

    qt.winrtrunner.app: This plugin does not support propagateSizeHints()
    qt.winrtrunner.app: Cannot find EGLConfig, returning null config
    qt.winrtrunner.app: QEGLPlatformContext: Failed to create context: 3005
    qt.winrtrunner.app: Cannot find EGLConfig, returning null config
    qt.winrtrunner.app: QEGLPlatformContext: Failed to create context: 3005
    qt.winrtrunner.app: QWidget::paintEngine: Should no longer be called
    qt.winrtrunner.app: QPainter::begin: Paint device returned engine == 0, type: 1
    qt.winrtrunner.app: QWidget::paintEngine: Should no longer be called
    qt.winrtrunner.app: QPainter::begin: Paint device returned engine == 0, type: 1
    qt.winrtrunner.app: QPainter::pen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QWidget::paintEngine: Should no longer be called
    qt.winrtrunner.app: QPainter::begin: Paint device returned engine == 0, type: 1
    qt.winrtrunner.app: Cannot find EGLConfig, returning null config
    qt.winrtrunner.app: QEGLPlatformContext: Failed to create context: 3005
    qt.winrtrunner.app: QWidget::paintEngine: Should no longer be called
    qt.winrtrunner.app: QPainter::begin: Paint device returned engine == 0, type: 1
    qt.winrtrunner.app: QWidget::paintEngine: Should no longer be called
    qt.winrtrunner.app: QPainter::begin: Paint device returned engine == 0, type: 1
    qt.winrtrunner.app: QPainter::pen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QPainter::setPen: Painter not active
    qt.winrtrunner.app: QWidget::paintEngine: Should no longer be called
    qt.winrtrunner.app: QPainter::begin: Paint device returned engine == 0, type: 1
    

  • Qt Champions 2018

    @Craftplorer said in QT UWP and Qt Widget:

    Currently I use the UWP kit with the widget project

    So, you actually are able to create an UWP widgets project? Because before you said you only can create QML UWP projects.
    Try to update your graphics card drivers, maybe these errors/warnings will disappear.
    Did you try to put some widgets on your empty main window?



  • Yes I put a label and a button on the main widget with the qt form editor also I can start the widget project with the desktop MSVC qt kit but when I change to uwp MSVC kit I just get a blank window and lots of errors (see above). Also I did all updates one thing to say it is only a windows 10 vm but it should work anyway right?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.