CMAKE_PREFIX_PATH doesn’t help CMake in finding Qt5

I installed the following missing packages: sudo apt-get install qtbase5-dev sudo apt-get install qtdeclarative5-dev Attaching any kind of prefix is not required now: CMakeList: :~/junk/qtquick_hello_cmake$ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8.12) project(qtquick_hello_cmake) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) find_package(Qt5 COMPONENTS Quick Core REQUIRED) qt5_add_resources(RESOURCES qml.qrc) add_executable(${PROJECT_NAME} “main.cpp” “qml.qrc”) qt5_use_modules(${PROJECT_NAME} Quick Core) target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Quick) New output: :~/junk/qtquick_hello_cmake$ … Read more

Remove selected items from listWidget

One way to remove item from QListWidget is to use QListWidget::takeItem which removes and returns the item : QList<QListWidgetItem*> items = ui->listWidget->selectedItems(); foreach(QListWidgetItem * item, items) { delete ui->listWidget->takeItem(ui->listWidget->row(item)); } Another way is to qDeleteAll : qDeleteAll(ui->listWidget->selectedItems());

QWebView or QWebEngineView

I would give QtWebEngine a try. It is replacing QtWebKit for a reason. If you control the HTML that is getting rendered, then it probably doesn’t hurt to use QWebKit. Just make sure you test your pages beforehand. QWebView uses WebKit as the backend. http://doc.qt.io/qt-5/qwebview.html#details QWebEngineView uses Chromium as the backend. http://doc.qt.io/qt-5/qwebengineview.html#details WebKit is what … Read more

Application deployed with QT5 libraries does not start on Windows 7

After several days of search with no progress, we stumbled upon a QT bug: https://bugreports.qt.io/browse/QTBUG-28766 With QT5, in addition to expected QT libraries, msvcr100.dll, and msvcp100.dll; it turns out that you have to ship your application with: platforms/qminimal.dll platforms/qwindows.dll as well. Which is found in your local QT5 library install @: \Qt5.0.0\5.0.0\msvc2010\plugins\platforms I searched everywhere, … Read more

Qt5 QML module is not installed

I’ll try to answer your questions: I think installed means they are located in the proper paths, so that they can be found at runtime You should not necessarily create/build a QmlExtensionPlugin for that purpose. You can also use as a module plain QML files in one directory with a qmldir describing this module. It … Read more

Qt5 Static Build yields Failed to load platform plugin “windows”

For dynamic build only: Make sure you move the qwindows.dll to the following directory: yourapp.exe Qt5Core.dll … platforms/qwindows.dll … Note that the plugins directory is missing! You put all the needed folders from QT_BASE/…/plugins/* directly together with your binaries. BTW: I did not need libEGL.dll, but my application almost has no GUI. My source: http://qt-project.org/forums/viewthread/27056/#122588

tech