Error creating a database query in C++/Qt6
Stack Overflow » Qt
by zxctatar
5h ago
I get an error when creating a query to the database, this is not my first query in the code, but it gives an error and I do not know what to do with it, if I create this query in the database itself, then there is no error, this is what the error looks like: "QODBCResult::exec: Unable to execute statement:" Error: "[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2." here is the code: QSqlQuery queryRequest(db); queryRequest.prepare("INSERT INTO ЗаявкаНаРемонт (id_клиента, Дата, Оборудование, Тип_неисправности, Описание_проблемы, Статус_ ..read more
Visit website
In Qt, the style sheet set for the child window does not take effect normally
Stack Overflow » Qt
by coucou
8h ago
I'm developing a program using Qt/C++ in Windows. I had created two subclasses that inherit from QWidge. The windows based on these two classes were created respectively, one of which is a child window of the other. Subsequently, I placed a QLabel in the child window. Surprisingly, the child window background was transparent. When I set a style sheet for the parent window, the style sheet works normally. But when I set a style sheet for the sub-window, the style sheet does not work on the sub-window itself, but on the label inside it. Just like this: the stylesheet for the sub-window doesn't w ..read more
Visit website
Why doesn't QTreeView show newly added node to non-root node in QAbstractItemModel
Stack Overflow » Qt
by Damn Vegetables
10h ago
I created a custom model for QTreeView. The complete minimal code to show the problem is below. If I add a new node to the root node, by clicking "Add Level 1", it shows up. But if I add a new node to the second level by clicking "Add Level 2", it does not show up. That node only shows up if I collapse the parent node and then expand it again. What part of my MyTreeModel is wrong? I am adding the QT tag, even though my code is PySide6, because the fault is probably in my understanding of the methods of QAbstractItemModel, which is not something specific to Python or to PySide. Full Code from ..read more
Visit website
UART setup in Beaglebone Black
Stack Overflow » Qt
by user23494417
12h ago
I want to transfer data from a Qt application in one PC, to the Qt application integrated in the flashed yocto linux image in the SD card in the BeagleBone Black board via RS485. This Qt application will be launched on booting the BBB. I understand that there are multiple UARTs available for BBB. I want to know if all of these pins for UART are already enabled or not. If not, how to enable those pins for doing serial communication. I found this BB-UART4-00A0.dtbo file in the boot partition of my SD card. /dts-v1/; // magic: 0xd00dfeed // totalsize: 0x3f9 (1017) // off_dt_struct ..read more
Visit website
PyQt5 QTableView header with two lines of text, each with different font?
Stack Overflow » Qt
by sdbbs
13h ago
The minimal example code below renders the following GUI: What I would like to achieve, instead, is this (manually edited image): ... which is to say, I would like the column (horizontal) headings to have two lines of text, centered: the top line of text in bigger font size, and the bottom one in smaller font size and bold font. I originally hoped that I could just use HTML and QCSS styling for this, but https://forum.qt.io/topic/30598/solved-how-to-display-subscript-text-in-header-of-qtableview this is not supported by Qt, you would need to implement a QStyledItemDelegate and set it to y ..read more
Visit website
CMake could not find GTest on Windows
Stack Overflow » Qt
by dfensdev
14h ago
I am building a Google Test project in Qt Creator using CMake. The library is located in C:/cpplibraries/googletest-1.13.0. This is the auto-generated CMakeLists.txt file for the project: cmake_minimum_required(VERSION 3.5) project(testProj LANGUAGES CXX) enable_testing() set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) if ($ENV{GOOGLETEST_DIR}) get_filename_component(_GTEST_BASE $ENV{GOOGLETEST_DIR} REALPATH) elseif (EXISTS "C:/cpplibraries/googletest-1.13.0") # set by QC get_filename_component(_GTEST_BASE "C:/cpplibraries/googletest-1.13.0" REALPATH) # set by QC en ..read more
Visit website
How to implement high performance 4K background for QML View3D?
Stack Overflow » Qt
by Illy
14h ago
Hello I'm using QML View3D and PhysicsWorld to model dices. For my task I need ability to set custom background image for modelled "world". The image should be ~4K resolution, as far as rendered image will be displayed on 4K screen. For the moment I use following solution: View3D{ ... Model{ Node{ z: -80 Rectangle{ anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter id: rectBG width: testBG.width height: testBG.height I ..read more
Visit website
Issue with MSVC compiler in QT
Stack Overflow » Qt
by JOE
17h ago
I am not able to use MSVC COMPILER in qt i am also getting CMake kit configuration issue so i have separately installed CMake and added the path in qt which is CMake-D i have installed visual studio 2019 i am not able still use MSVC Compiler.I have attached snaps Am i missing any step.MSVC issue CMake path Kit config CMake errors ..read more
Visit website
InnerShadow effect not being applied in qml application
Stack Overflow » Qt
by Raghav
19h ago
I create a InnerShadow effect using Qt Quick Effect Maker, preview seems to be working fine. but when I am trying to implement this effect into my QML application it is not being reflected there. I exported this effect with both options Qt 6 Compatibility and Qt Latest but it is still not working. I am using: PySide6 Qt 6.5.3 Qt Creator 10.0.2 Here is the simple page I am trying to build. import QtQuick import QtQuick.Window import QtQuick.Effects import "widgets" import "effects/InnerShadow" Window { width: 640 height: 480 visible: true color: "#ffffff" Rectangle ..read more
Visit website
Why share contexts are different between QOpenglWidget and custom QOffscreenSurface after set Qt::AA_ShareOpenGLContexts
Stack Overflow » Qt
by Chris
20h ago
I have a QOpenglWidget and a customized QOffscreenSurface,then I set Qt::AA_ShareOpenGLContexts attribute to QCoreApplication,here is my code: void main(){ QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QApplication a(argc, argv); MainWindow w; w.show(); } mainwindow has a subclass of QOpenglWidget TextureWidget and a subclass of QOffscreenSurface OffscreenRender, I want to share buffer objects and texture objects between these two class. MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { center = new QSplitter(); center->resize(800,4 ..read more
Visit website

Follow Stack Overflow » Qt on FeedSpot

Continue with Google
Continue with Apple
OR