Monthly Archives: November 2019

Qt Test / UnitTest

Qt Test
Qt Test Overview
Qt Test Tutorial
Chapter 1: Writing a Unit Test

Qt Creator

Running Autotests

YouTube

Qt Testing

  • Qt GUI Testing with Squish
  • Automated GUI Regression Testing with Squish for Qt
  • QtDD13 – Thomas Perl – Python 3 and Qt 5 with QML
  • Qt DevDays 2010 – Introduction to Automated Testing for Qt Applications – Rohan McGovern
  • Are you testing enough – Qt application Quality Assurance, Harri Porten, froglogic
  • QtWS15- Are you testing enough – Qt application Quality Assurance, Harri Porten, froglogic
  • C++ Unit Testing with Google Test Tutorial
  • Qt DevDays 2006 – Unit Testing in Qt Applications: Harald Fernengel
  • Automated Qt and QML GUI testing with Squish
  • QML for desktop apps – Michael Wagner and Helmut Sedding
  • Using Catch Unit Test Framework on QT (mingw)
  • [Qt] Use google test in Qt creator
  • TUG: GUI Unit Testing for Qt applications. Overview and Use case
  • Automated GUI Testing: Squish 4.1 in 10 Minutes
  • QtDD14 – Behavior-Driven Development and Testing of Qt C++ & QML Applications – Reginald Stadlbauer
  • Squish for Windows: Automated GUI Testing – Webinar
  • Настройка и использование Google Test в Qt Creator
  • Squish GUI Tester’s Jenkins Integration

Qt OpenGL


Qt6 Docs

Qt OpenGL
QOpenGLWidget Class

update() vs. updateGL()

If you need to trigger a repaint from places other than paintGL() (a typical example is when using timers to animate scenes), you should call the widget’s update() function to schedule an update.

QOpenGLWidget::update() method
vs.
QGLWidget::updateGL() slot


CMake

Find OpenGL

How to compile GLUT + OpenGL project with CMake and Kdevelop in linux

/c/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64
GlU32.Lib
OpenGL32.Lib

Incorrect

find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets OpenGL OpenGLWidgets REQUIRED)
target_link_libraries(QtOpenGLExample1 PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::OpenGL Qt${QT_VERSION_MAJOR}::OpenGLWidgets)
cmd.exe /C "cd . && C:\Qt\Tools\CMake_64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\QtOpenGLExample1.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo CMakeFiles\QtOpenGLExample1.dir\QtOpenGLExample1_autogen\mocs_compilation.cpp.obj CMakeFiles\QtOpenGLExample1.dir\main.cpp.obj CMakeFiles\QtOpenGLExample1.dir\mywidget.cpp.obj CMakeFiles\QtOpenGLExample1.dir\renderer.cpp.obj  /out:QtOpenGLExample1.exe /implib:QtOpenGLExample1.lib /pdb:QtOpenGLExample1.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  C:\Qt\6.2.1\msvc2019_64\lib\Qt6OpenGLWidgetsd.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6Widgetsd.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6OpenGLd.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6Guid.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6Cored.lib  mpr.lib  userenv.lib  d3d11.lib  dxgi.lib  dxguid.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."

LINK Pass 1: command "C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo CMakeFiles\QtOpenGLExample1.dir\QtOpenGLExample1_autogen\mocs_compilation.cpp.obj CMakeFiles\QtOpenGLExample1.dir\main.cpp.obj CMakeFiles\QtOpenGLExample1.dir\mywidget.cpp.obj CMakeFiles\QtOpenGLExample1.dir\renderer.cpp.obj /out:QtOpenGLExample1.exe /implib:QtOpenGLExample1.lib /pdb:QtOpenGLExample1.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console C:\Qt\6.2.1\msvc2019_64\lib\Qt6OpenGLWidgetsd.lib C:\Qt\6.2.1\msvc2019_64\lib\Qt6Widgetsd.lib C:\Qt\6.2.1\msvc2019_64\lib\Qt6OpenGLd.lib C:\Qt\6.2.1\msvc2019_64\lib\Qt6Guid.lib C:\Qt\6.2.1\msvc2019_64\lib\Qt6Cored.lib mpr.lib userenv.lib d3d11.lib dxgi.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\QtOpenGLExample1.dir/intermediate.manifest CMakeFiles\QtOpenGLExample1.dir/manifest.res" failed (exit code 1120) with the following output:

renderer.cpp.obj : error LNK2019: unresolved external symbol __imp_glBegin [...]

Correct

find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets OpenGLWidgets REQUIRED)
find_package(OpenGL REQUIRED)

target_link_libraries(
	QtOpenGLExample1
	PRIVATE
		Qt${QT_VERSION_MAJOR}::Widgets
		Qt${QT_VERSION_MAJOR}::OpenGLWidgets
		${OPENGL_LIBRARIES}
)
cmd.exe /C "cd . && C:\Qt\Tools\CMake_64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\QtOpenGLExample1.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo CMakeFiles\QtOpenGLExample1.dir\QtOpenGLExample1_autogen\mocs_compilation.cpp.obj CMakeFiles\QtOpenGLExample1.dir\main.cpp.obj CMakeFiles\QtOpenGLExample1.dir\mywidget.cpp.obj CMakeFiles\QtOpenGLExample1.dir\renderer.cpp.obj  /out:QtOpenGLExample1.exe /implib:QtOpenGLExample1.lib /pdb:QtOpenGLExample1.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  C:\Qt\6.2.1\msvc2019_64\lib\Qt6OpenGLWidgetsd.lib  opengl32.lib  glu32.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6Widgetsd.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6OpenGLd.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6Guid.lib  C:\Qt\6.2.1\msvc2019_64\lib\Qt6Cored.lib  mpr.lib  userenv.lib  d3d11.lib  dxgi.lib  dxguid.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."


Tutorials

KDAB

OpenGL in Qt 5.1 – Part 1
OpenGL in Qt 5.1 – Part 2
OpenGL in Qt 5.1 – Part 3
OpenGL in Qt 5.1 – Part 4
Goodbye, Q_FOREACH, A porting guide to C++11 ranged for-loops

Qt Blog

Iterating efficiently

Universität Marburg – Prof. Dr. Thorsten Thormählen

Multimediale Signalverarbeitung (SS 2021)
Grafikprogrammierung (WS 2020/2021)
Technische Informatik (WS 2020/2021)

Multimediale Signalverarbeitung – Bildverarbeitung: Filter
Grafikprogrammierung – Kameras: Perspektivische Projektion
Bildsynthese – Vulkan Ray Tracing Pipeline
LookAtLocalTrans.cpp

Dr. Andreas Nicolai

TU Dresden Dr. Andreas Nicolai
OpenGL + Qt Tutorial
github.com/ghorwin/OpenGLWithQt-Tutorial

Trent Reed

2015
Qt5 OpenGL Part 0: Creating a Window
Qt5 OpenGL Part 1: Basic Rendering
Qt5 OpenGL Part 2: 3D Rendering
Qt5 OpenGL Part 3a : Efficient Input Managers
Qt5 OpenGL Part 3b: Camera Control
Qt5 OpenGL Part 4: Error Checking
Qt5 OpenGL Part 5: Debug Logging

FatalErrors

QT based OpenGL tutorial learning 15 – Geometric shaders
OpenGl L21 geometry shader
OpenGl L11 multi light source
OpenGL learning record 6: advanced lighting (lighting texture & projection
OpenGL with QtWidgets: Material, Lightmap
QT based OpenGL tutorial learning 17 – Implementation of Catmull ROM spline based on geometric shaders

Asia

QT based OpenGL tutorial learning 4 – Camera 2
QT based OpenGL tutorial learning 1 – Supplement
Hello Triangle
github.com/chengxuyuanwangye/LearnOpengl_QT


Qt

Qt5 OpenGL Examples from the Qt OpenGL module
Qt6 OpenGL Examples from the Qt OpenGL module


Wikipedia

Kategorie:Bildsynthese
Culling
Framebuffer Object (FBO)


Khronos

Framebuffer Object
OpenGL Loading Library

Qt UWP

Qt for UWP

Qt – UWP – Raspberry Pi
Stefan Wick
github.com/StefanWickDev/UWP-FullTrust/tree/master/UWP_FullTrust_1, UWP with Desktop Extension Tutorial – Part 1
UWP with Desktop Extension – Part 1
UWP with Desktop Extension – Part 2

QT “Hello, world” on Windows 10
Error in Qt Creator: “The environment variable ExtensionSdkDir is not set”
‘App installer failed to install package dependencies. Ask the developer for Microsoft.VCLibs.140.00
C++ Runtime v14 framework package for Desktop Bridge (Project Centennial)
C++ Runtime framework packages for Desktop Bridge
DEP0800: Cannot deploy UWP app after upgrading to VS 2015 Update 3
How to silent install an UWP appx?

QtWS15- Developing for Windows 10 With Qt, Maurice Kalinowski, The Qt Company

Compile instructions (Windows – MSVC with Qt Creator)
How to configure a usable Kit for Qt after reinstalling Visual Studio 2017
Adding MSVC 2017 to Qt
Qt Visual Studio Tools
Qt Tools and Versions & MSVC 2019
$Bluetooth mit einer Universal Windows App
How to use Qt with Visual Studio 2017?
QTVSADDINBUG-591 Support Visual Studio 2019

Qt Visual Studio Tools 2.2.0 Released, February 26, 2018
Qt Visual Studio Tools 2.3.1 Released, January 21, 2019

Use the Microsoft C++ toolset from the command line
github.com/musescore/MuseScore/blob/master/msvc_build.bat

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64
cd c:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest
C:\Qt\5.12.5\msvc2017_64\bin
C:\Program Files (x86)\Windows Kits\10

>CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 10.0.17763.132 -vcvars_ver=14.16
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.3.8
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[ERROR:winsdk.bat] Windows SDK 10.0.17763.132 : 'C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.132\um' not found or was incomplete
The input line is too long.
The syntax of the command is incorrect.


>CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"

>CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 10.0.17763.0 -vcvars_ver=14.16.27023
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.3.8
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

> msvc_build.bat relwithdebinfo
Build folder is: msvc.build_x64
Install folder is: msvc.install_x64
A subdirectory or file msvc.build_x64 already exists.
A subdirectory or file msvc.install_x64 already exists.
Building CMake configuration...
CMake Error at CMakeLists.txt:3 (project):
  Generator

    Visual Studio 15 2017 Win64

  could not find any instance of Visual Studio.



-- Configuring incomplete, errors occurred!
See also "C:/Users/andreas/Documents/QtProjects/FluoedemaSource/BleTest/msvc.build_x64/CMakeFiles/CMakeOutput.log".
Building MuseScore...
The system cannot find the path specified.
CMake Error:
  Generator

    Visual Studio 15 2017 Win64

  could not find any instance of Visual Studio.


=================

Qt for UWP 64bit (MSVC 2015)

> CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 10.0.18362.0
> set "ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs"
>winrtrunner --device 0 --start --stop --wait 0 --profile appx C:/Users/andreas/Documents/QtProjects/FluoedemaSource/build-BleTest4-Qt_5_12_5_for_UWP_64bit_MSVC_2015-Debug/debug/BleTest4.exe

qt.winrtrunner: Using the Appx profile.
qt.winrtrunner: Unable to register package: "Windows cannot install package fd5fcfd3-6131-4810-9462-3c5bb061b29d_1.0.0.0_x64__a281374cnhzmt because this package depends on a framework that could not be found. Provide the framework \"Microsoft.VCLibs.140.00.Debug\" published by \"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US\", with neutral or x64 processor architecture and minimum version 14.0.0.0, along with this package to install. The frameworks with name \"Microsoft.VCLibs.140.00.Debug\" currently installed are: {}"

PS C:\Users\andreas> Add-AppxPackage "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs\14.0\Appx\Debug\x86\Microsoft.VCLibs.x86.Debug.14.00.appx"
Add-AppxPackage : Cannot find path

PS C:\Users\andreas> Add-AppxPackage "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs.Desktop\14.0\Appx\Debug\x64\Microsoft.VCLibs.x64.Debug.14.00.Desktop.appx"

PS> Get-AppxPackage
PS> Get-AppxPackage | Select Name, PackageFullName
PS> Get-AppxPackage Microsoft.VCLibs.140.00 | Remove-AppxPackage

Microsoft.VCLibs.140.00.Debug.UWPDesktop_14.0.24222.0_x64__8wekyb3d8bbwe
Microsoft.VCLibs.140.00.UWPDesktop_14.0.26905.0_x64__8wekyb3d8bbwe
Microsoft.VCLibs.140.00.UWPDesktop_14.0.27629.0_x64__8wekyb3d8bbwe
Microsoft.VCLibs.140.00.UWPDesktop_14.0.27629.0_x86__8wekyb3d8bbwe
Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe
Microsoft.VCLibs.140.00_14.0.27323.0_x86__8wekyb3d8bbwe

> Get-AppxPackage Microsoft.VCLibs.140.00.Debug*
Name              : Microsoft.VCLibs.140.00.Debug.UWPDesktop
Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        :
Version           : 14.0.24222.0
PackageFullName   : Microsoft.VCLibs.140.00.Debug.UWPDesktop_14.0.24222.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program
                    Files\WindowsApps\Microsoft.VCLibs.140.00.Debug.UWPDesktop_14.0.24222.0_x64__8wekyb3d8bbwe
IsFramework       : True
PackageFamilyName : Microsoft.VCLibs.140.00.Debug.UWPDesktop_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : False
IsPartiallyStaged : False
SignatureKind     : Developer
Status            : Ok
C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest_VC\BleTest_VC\BleTest_VC.vcxproj : warning  : The build tools for Visual Studio 2019 (v142) cannot be found. Install Visual Studio 2019 (v142) to build using the Visual Studio 2019 (v142) build tools.

C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest_VC\BleTest_VC\BleTest_VC.vcxproj : warning  : Platform 'x64' referenced in the project file 'BleTest_VC' cannot be found.

error : Designtime build failed for project 'C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest_VC\BleTest_VC\BleTest_VC.vcxproj' configuration 'Debug|x64'. IntelliSense might be unavailable.
	Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.
C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest2_VC\BleTest2_VC\BleTest2_VC.vcxproj : warning  : The build tools for Visual Studio 2019 (v142) cannot be found. Install Visual Studio 2019 (v142) to build using the Visual Studio 2019 (v142) build tools.

C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest2_VC\BleTest2_VC\BleTest2_VC.vcxproj : warning  : Platform 'x64' referenced in the project file 'BleTest2_VC' cannot be found.

error : Designtime build failed for project 'C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest2_VC\BleTest2_VC\BleTest2_VC.vcxproj' configuration 'Debug|x64'. IntelliSense might be unavailable.
	Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.
Running Windows Runtime device detection.
C:/Qt/5.12.5/winrt_x64_msvc2017/bin/winrtrunner.exe --list-devices
Running Windows Runtime device detection.
C:/Qt/5.12.5/winrt_x64_msvc2017/bin/winrtrunner.exe --list-devices
Running Windows Runtime device detection.
C:/Qt/5.12.5/winrt_x64_msvc2017/bin/winrtrunner.exe --list-devices
Found 1 Windows Runtime devices.
Found 1 Windows Runtime devices.
Found 1 Windows Runtime devices.
Cannot parse project "BleTest": No kit selected.
Running Windows Runtime device detection.
C:/Qt/5.12.5/winrt_x64_msvc2017/bin/winrtrunner.exe --list-devices
Running Windows Runtime device detection.
C:/Qt/5.12.5/winrt_x64_msvc2017/bin/winrtrunner.exe --list-devices
Running Windows Runtime device detection.
C:/Qt/5.12.5/winrt_x64_msvc2017/bin/winrtrunner.exe --list-devices
Found 1 Windows Runtime devices.
Found 1 Windows Runtime devices.
Found 1 Windows Runtime devices.
Project ERROR: Cannot run target compiler 'cl'. Output:
===================
===================
Maybe you forgot to setup the environment?
Error while parsing file C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest\BleTest.pro. Giving up.
Project ERROR: Cannot run target compiler 'cl'. Output:
===================
===================
Maybe you forgot to setup the environment?
Error while parsing file C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest\BleTest.pro. Giving up.
Project ERROR: Cannot run target compiler 'cl'. Output:
===================
===================
Maybe you forgot to setup the environment?
Error while parsing file C:\Users\andreas\Documents\QtProjects\FluoedemaSource\BleTest2\BleTest2.pro. Giving up.

Qt Debug / Debugging Techniques

Qt Weekly #1: Categorized Logging

QMessageLogger Class
QLoggingCategory Class
Debugging Techniques
Creating Custom Qt Types

How to use Q_LOGGING_CATEGORY and reference the category in a templated function without getting a multiple implementation error?

Logging with Qt
github.com/francescmm/QLogger, Thread-safe logger for Qt applications

Qt Logging Framework (PDF)

QT5 TUTORIAL QTEXTSTREAM – 2018

Custom Qt Types

Printing Custom Qt Types with qDebug()

Old?!

Simple-logger
github.com/robbmj/QtLogger, A simple logger for Qt