Issues with QWebView in Qt 5.14.1 with mingw on Windows
Hi Guys
I am using Qt creator 4.11.1 with Qt 5.14.1 and MinGW on Windows. Added "QT += webkit" in pro file Included "import QtWebKit 1.0" in qml Added below code in same qml WebView { id: idWebview anchors.fill: parent url: "https://www.google.com/" }
It is build successfully but when I run the application getting "module "QtWebKit" is not installed" I tried "import QtWebView 1.0" instead of QtWebKit, getting "module "QtWebView" is not installed". Couldn't find much on google. Any help will be appreciated.
https://redd.it/kls9vu
@qt_reddit
Beginner general guidance
Hi I am given the task of making a GUI application that will run on a windows machine, the program will take some input from COM port and some input from user, then it will communicate back to COM and user, what technologies should I use, I am confused between using python or c++ for such task
https://redd.it/klnqnb
@qt_reddit
SQLITE QDatabase segfault from shared library
My application uses sqlite databases but the instances of the database are constructed & used in a shared library.
I have been doing some memory housekeeping and have come across an issue that when QSqlDatabase is used for a sqlite database, that closing the connection to the database results in a segfault when exiting the main application - but this only happens on macOS.
I tracked the issue down to the 2 shared libraries, that use QSqlDatabase, if I forego closing the connection and cleaning up then the crash doesn't happen.
Anybody come across anything similar?
https://redd.it/klc99f
@qt_reddit
Error: QML module not found, on every import except QtQuick
Hi, I'm moving my project to a new computer, but unfortunately I'm getting I'm getting an error "QML module not found" on every single module I have imported, except for just plain and simple QtQuick. When opening the file in the GUI designer it gives this more detailed error:
Line: 2: QML module not found (QtQuick.Dialogs).
Import paths:
For qmake projects, use the QMLIMPORTPATH variable to add import paths.
For Qbs projects, declare and set a qmlImportPaths property in your product to add import paths.
For qmlproject projects, use the importPaths property to add import paths.
For CMake projects, make sure QMLIMPORTPATH variable is in CMakeCache.txt.
The project works just fine on my other computer, and I can run the project just fine, it's just that Qt Creator is flipping out; why are these errors happening, and how can I make them go away?
I'm on Ubuntu 20.04.1, and the project is meant to be Qt 5.15.2 (using PySide2).
https://redd.it/kk8nfh
@qt_reddit
QT QX11Info console application frustrations
I posted the question on SO, but here it is again:
#include <QCoreApplication>
#include <QProcessEnvironment>
#include <QDebug>
#include <QX11Info>
/*
Example of using QX11Info class.
*/
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
qDebug() << "Qt version:" << QT_VERSION_STR;
qDebug() << "DISPLAY:" << QProcessEnvironment::systemEnvironment().value("DISPLAY");
// APIs common to Qt 4 and Qt 5.1
int screen = QX11Info::appScreen();
qDebug() << "Screen:" << QX11Info::appScreen();
qDebug() << "DPI X:" << QX11Info::appDpiX(screen);
qDebug() << "DPI Y:" << QX11Info::appDpiY(screen);
qDebug() << "Root window handle:" << QX11Info::appRootWindow(screen);
qDebug() << "Time:" << QX11Info::appTime();
qDebug() << "User time:" << QX11Info::appUserTime();
qDebug() << "Display:" << QX11Info::display();
// Qt 5.1 APIs
#if QT_VERSION >= 0x050100
qDebug() << "XCB connection:" << QX11Info::connection();
#endif
// Qt 4 APIs
#if QT_VERSION < 0x050000
qDebug() << "Cells:" << QX11Info::appCells(screen);
qDebug() << "Class:" << QX11Info::appClass();
qDebug() << "Color map:" << QX11Info::appColormap(screen);
qDebug() << "Default color map:" << QX11Info::appDefaultColormap(screen);
qDebug() << "Default visual:" << QX11Info::appDefaultVisual(screen);
qDebug() << "Depth:" << QX11Info::appDepth(screen);
qDebug() << "Visual:" << QX11Info::appVisual(screen);
qDebug() << "Is composite manager running?"
<< QX11Info::isCompositingManagerRunning();
#endif
}
Qt version: 5.15.2
DISPLAY: ":0.0"
Screen: 0
DPI X: 0
DPI Y: 0
Root window handle: 0
Time: 0
User time: 0
Display: 0x0
XCB connection: 0x0
cmake_minimum_required(VERSION 3.17)
project(XSmartWin)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(QT_VERSION 5)
set(REQUIRED_LIBS Core X11Extras)
set(REQUIRED_LIBS_QUALIFIED Qt5::Core Qt5::X11Extras xcb)
find_package(Qt${QT_VERSION} COMPONENTS ${REQUIRED_LIBS} REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} ${REQUIRED_LIBS_QUALIFIED})
QT creator only opening qbs files
I assume this is a basic problem thats just happening because I'm new to the software but i cannot open any files properly, I have a blank file taken from a computer where it works and now it won't, all I have done is change the path so its correct, it loads the file but ONLY the qbs stuff, how to I get it to open the other files in the project? Only again its a totally blank project I just changed the path so its correct.
https://preview.redd.it/rc9u2kjmkm661.jpg?width=328&format=pjpg&auto=webp&s=ab6ceff546a821ab9405a3ec29b06bf57367d8f2
https://redd.it/kht1ps
@qt_reddit
Unhandled exception at 0x000007FED83CDC66 (opencvworld341d.dll) in trydemo.exe: 0xC000001D: Illegal Instruction.
Hello,
today when I ran a project involving QT+VS2015+OPENCV3.4.0, this error occured.
Unhandled exception at 0x000007FED83CDC66 (opencvworld341d.dll) in trydemo.exe: 0xC000001D: Illegal Instruction.
Anyone has any idea what happened? I searched online, and this is what I found. But it didn't solve my problem.
unhandled exception
https://redd.it/kh6we9
@qt_reddit
Qt5 qt help framework.
Im writing a qt5 python application using pyside2. I need to write the helpfiles. Are there any good tutorials on how to set up and use the qt help framework?
https://redd.it/kg7ka5
@qt_reddit
Qt Creator 4.14: What's new in C++ support?
https://www.qt.io/blog/qt-creator-4.14-whats-new-in-c-support
https://redd.it/kg3xp3
@qt_reddit
QColorDialog, am I going mad?
Under macOS it seems impossible to set the title of the dialog, calling setTitle does absolutely nothing (or at least it does for me!).
I've ended up writing a wrapper about QColorDialog which under Windows and Linux just uses the default Color dialog that Qt has chosen, while under macOS I've created a small helper function which wraps up the native macOS color dialog and setting the title via cocoa/obj-c works fine this way.
https://redd.it/kfizl6
@qt_reddit
Drawing geometrical elements on a 2D view
I'm working on surfaces with Qt Data Visualization. In practice, the user will mainly use the orthogonal view (2D view form the top (Z), using colors to represent depth). Does anyone have an idea on how to enable the user to make selections on that view, using rectangles or lines for example (I then extract the coordinates from those geometrical elements and extract a profil from the surface).
Cheers!
https://redd.it/kfhy0q
@qt_reddit
Any interested in being paid to do a small assignment?
The assignment is to create a simple POS system with GUI added. It is for a friend, please message me for more information and specifics about the assignment.
(should also mention he needs it by December 18 11:59 pm PST)
https://redd.it/kfa1ie
@qt_reddit
Qt Creator 4.14 released
https://www.qt.io/blog/qt-creator-4.14-released
https://redd.it/kezg3a
@qt_reddit
Hi I'm getting 6 errors in qendian.h about redeclaration for qbswap(). I have been trying to fix this but out of depth. I didn't touch this file either it's one of the core files. Any idea how to fix this? Any help will be appreciated.
https://redd.it/kehz1y
@qt_reddit
How do you set qt quick style variables (like "Dense" Material style) in PySide2?
I am trying to use the "Dense" material style setting as mentioned in here:
https://doc.qt.io/qt-5/qtquickcontrols2-material.html
But I can't figure out how to do it in PySide2; to use a qtquickcontrols2.conf file, it says on this page to use a .pro file:
https://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
But as far as I can tell that's only used in C++ Qt applications. And as for the alterative of doing it by setting the enviroment variable, I don't know how to do this either.
https://redd.it/ke6z7f
@qt_reddit
How do I set a default filename and filepath for a "save file" dialog?
I'm trying to get a "save file" dialog to have a default filename, but when I set the "folder" property, it just simply does not work; it defaults to some totally blank filepath (the very base of my filesystem it seems), with no name.
I suspect that it's because I'm trying to feed it a string for the filename, but the folder property apparently doesn't use a string like:
folder: 'file:///home/user/Documents/test/testfilename'
Or this:
folder: 'file:///' + txtExportPath.input
How do I set it correctly so that it recognizes the filepath and uses it as a default? The idea with the above example is that "test" is the folder it should open in, and "testfilename" the default filename given (which the user can then edit).
https://redd.it/klscph
@qt_reddit
Weekly What is everybody working on? Share your progress, discoveries, tips and tricks!
https://redd.it/kllglw
@qt_reddit
QSqlDatabase: QMYSQL driver not loaded
I cant connect to database using c++ on QT. I am trying for last 2 hours.
https://redd.it/klbj3v
@qt_reddit
My app uses Phonon, QT4, worked fine on 10.13 but crashes on 10.14
I have an app that was custom made for me by a company that's gone out of business. It used phonon and QT4 to display videos (and a lot more); it worked great on 10.13, but I've upgraded to Mojave and now it runs but crashes with a segmentation fault when it tries to open a video. Apparently QT5 doesn't have Phonon? are there any workarounds short of having to re-do the whole app? I have the sources; how to recompile so that it works on 10.14?
https://redd.it/kjy93g
@qt_reddit
Introduction to Qt / QML - Module 7: The C++ machine room
https://www.youtube.com/playlist?list=PL6CJYn40gN6gdhv9f3F3rrRC8X52pKI1J
https://redd.it/kitr06
@qt_reddit
Weekly What is everybody working on? Share your progress, discoveries, tips and tricks!
https://redd.it/khc6yt
@qt_reddit
Windows Do I have to compile Qt 5.15.X myself if I want ICU support?
I have a project that works fine and blazingly fast in 5.13.2. It uses a std::sort with a custom function that uses a QCollator.
When I compile the same project in 5.15.1, it's an absolute disaster. A sort of 14459 words that takes 516 ms in 5.13.2, takes 2819 ms in 5.15.1.
So I figured that probably QCollator was messed up in 5.15.1 but I understand that if you somehow enable ICU in Qt, it has a different implementation that uses ICU collation API instead of the native Windows implementation (using MSDN CompareStringEx).
The question is, how do I enable this to test it? Do I have to compile the whole Qt kit or is there a magic setting that somehow would enable it?
So far I'm totally sticking to 5.13.2.
https://redd.it/kh4gmx
@qt_reddit
Enforce license
Can Qt Company effectively enforce licenses (in some countries) if they ever did? Some small company or individual sells an app by breaking the license, so what?! Did anybody faced penalties? Any real concrete case in history, any "success" story?
https://redd.it/kg4pgo
@qt_reddit
Qt6 CMake quickstart template
I got tired of always making a new cmake setup for each project so I decided to make a template. Figured I would go ahead and share this here in case anyone wants to use it!
Andrew9317/qt6-cmake-template: Basic Qt6 template project using CMake (github.com)
https://redd.it/kfv8ph
@qt_reddit
A question about pricing and licensing.
Say I would like to develop a desktop app for 1 year in Qt and sell it to 10 different customers $100.000 for each license. So I will generate $1 million.
The open source version of Qt meets all my needs that I downloaded and the official website. So for development I won't need to buy a license ( I guess).
In this case what should I pay the Qt creators? What kind of options do I have?
Should I pay a percent from the sales or monthly for using the software?
I may find another customers in the future so I might generate a lot of money and I don't want to share a percent with Qt.
https://redd.it/kfhgyl
@qt_reddit
Is Qt running on a render loop?
I'm a unity developer and I'm working on a simple app that doesn't require 3d rendering. I'm trying to decide weather to just build it with unity or use a smaller UI API that doesn't require a game engine.
I think a good question to ask is: Is Qt running on a render loop? like it has an FPS. if so then I might consider just staying with Unity since it's kinda the same structure. Thoughts? Thank you
https://redd.it/kf8vj8
@qt_reddit
Copying pixels from one QML window to another
Is there a way to copy pixels from one part of an item to a next with a different QML window? I was hoping to use something simple like ShaderEffectSource to copy the stuff over to the other window, but it seems that doesn't work with multiple windows. Is there any better way to do this?
https://redd.it/keo80k
@qt_reddit
Qt4 to Qt5 migration
I'm currently working on a project that required Qt4, as I'm upgrading to Qt5, I tried to change the CMakeList.txt Old file :
findpackage (Qt4 REQUIRED)
include (${QTUSEFILE})
qt4addresources (QRCSOURCES ${RESOURCES})
qt4wrapcpp (MOCSOURCES ${HEADERS})
qt4addtranslation( TRANSLATIONSQM ${TRANSLATIONS} )
New one :
findpackage (Qt5Widgets REQUIRED)
qt5usemodules (${QTUSEFILE})
qt5addresources (QRCSOURCES ${RESOURCES})
qt5wrapcpp (MOCSOURCES ${HEADERS})
qt5addtranslation( TRANSLATIONSQM ${TRANSLATIONS} )
The error I get is :
CMake Error at CMakeLists.txt:120 (qt5usemodules):
qt5usemodules Macro invoked with incorrect arguments for macro named:
qt5usemodules
CMake Error at CMakeLists.txt:123 (qt5addtranslation):
Unknown CMake command "qt5addtranslation".
-- Configuring incomplete, errors occurred!
See also "/home/maifee/Desktop/Paint/CMakeFiles/CMakeOutput.log".
Finished
Complete CMakeList : https://github.com/maifeeulasad/Paint/blob/main/CMakeLists.txt#L119
https://redd.it/ke7uhi
@qt_reddit
How to style menus and comboboxes to have smaller items (less padding)?
All of the menus and combobox list items have a lot more padding than necessary for a desktop application (screenshot example, QML is on the right; not my image BTW, just an example), and I was wondering how to go about shrinking them to something more similar to other applications.
How do I go about styling this? I can't figure out how to customize the items by modifying the menu (or the combobox), so the only way seems to be changing the height and width of the menu items themselves individually, and I have no solution for the combobox yet.
https://redd.it/kdmip7
@qt_reddit