qutepart - a C++ code editor widget
Hi,
I took over the development of QutePart. This project aims to bring a full blown code editor (current line, brackets, syntax highlighting, auto indentation, white space.. and more).
The code uses internally the Kate syntax highlighter definitions (but uses non of the Kate code). Its *very* easy to integrate, 3 lines in your cmake (assuming you use [CPM](https://github.com/cpm-cmake/CPM.cmake/)):
CPMAddPackage("gh:diegoiast/qutepart-cpp#main")
add_executable(app ...)
target_link_libraries(app PUBLIC ... qutepart ...)
Code is available here: [https://github.com/diegoiast/qutepart-cpp](https://github.com/diegoiast/qutepart-cpp)
https://redd.it/1fi8bha
@qt_reddit
qtcreator on wayland acting weird
Hi there,
I know there are plenty of this on the internet, but I have no problem (??) in the debug mode :
`ess@tinpatrick:~$ qtcreator -platform wayland`
`qt.core.plugin.factoryloader: checking directory path "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms" ...`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqoffscreen.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqoffscreen.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"offscreen"`
`]`
`},`
`"archlevel": 1,`
`"className": "QOffscreenIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"xcb"`
`]`
`},`
`"archlevel": 1,`
`"className": "QXcbIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimalegl.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimalegl.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"minimalegl"`
`]`
`},`
`"archlevel": 1,`
`"className": "QMinimalEglIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl")`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqlinuxfb.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqlinuxfb.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"linuxfb"`
`]`
`},`
`"archlevel": 1,`
`"className": "QLinuxFbIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb")`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimal.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimal.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"minimal"`
`]`
`},`
`"archlevel": 1,`
`"className": "QMinimalIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqeglfs.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqeglfs.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"eglfs"`
`]`
`},`
`"archlevel": 1,`
`"className": "QEglFSIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs")`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvkkhrdisplay.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvkkhrdisplay.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"vkkhrdisplay"`
`]`
`},`
`"archlevel": 1,`
`"className":
Qt Creator and CLion - how to install and use tutorial
https://www.youtube.com/watch?v=1mt3X6JgcOA
https://redd.it/1fgo9nm
@qt_reddit
Need help with PyQt5 layout issues
Hello everyone,
I'm working on a PyQt5 application where I need to dynamically update a QWidget (named frame3) to display one to four images in different layouts. I've implemented various functions to handle these layouts using QSplitter, but I'm facing issues with updating the layout correctly. Specifically, the frame3 widget doesn't seem to refresh as expected to show the images correctly.
Here's a brief overview of what I've implemented:
Clearing the Layout:
def clearlayout(self):
for i in reversed(range(self.frame3.layout().count())):
widget = self.frame3.layout().itemAt(i).widget()
if widget is not None:
widget.deleteLater()
Displaying One Image:
def displayoneimage(self):
self.clearlayout()
self.QtSagittalOrthoViewer.setFixedSize(800, 500)
self.frame3.layout().addWidget(self.QtSagittalOrthoViewer)
self.frame3.layout().update()
self.frame3.update()
Displaying Two Images Vertically:
def displaytwoimagesvertical(self):
self.clearlayout()
self.QtSagittalOrthoViewer.setFixedSize(300, 300)
self.QtAxialOrthoViewer.setFixedSize(300, 300)
verticalsplitter = QtWidgets.QSplitter(QtCore.Qt.Vertical)
verticalsplitter.addWidget(self.QtSagittalOrthoViewer)
verticalsplitter.addWidget(self.QtAxialOrthoViewer)
self.frame3.layout().addWidget(verticalsplitter)
self.frame3.layout().update()
Displaying Three Images in Various Configurations: I've implemented similar methods for displaying three images in horizontal and T-shaped layouts, as well as for four images.
The problem I'm encountering is that the frame3 layout does not seem to update correctly with the new splitters and widget configurations. Despite clearing the layout and forcing updates, the changes do not reflect properly.
What I've Tried:
Ensured that clearlayout() is properly removing all existing widgets.
Added update() calls on both frame3.layout() and frame3.
Verified that the widget sizes are set correctly before adding them to the layout.
Questions:
Are there any common issues or mistakes in dynamically updating layouts with splitters in PyQt5 that I might be overlooking?
Could there be any improvements or alternative approaches to ensure frame3 updates correctly?
I would greatly appreciate any insights, suggestions, or code reviews to help resolve this issue. Thank you in advance!
https://redd.it/1fffo6q
@qt_reddit
New Qt Extension for Visual Studio Code 1.0 published!
https://www.qt.io/blog/new-qt-extension-for-visual-studio-code-1.0-published
https://redd.it/1fe5ky8
@qt_reddit
Qt Creator User Survey 2024
https://www.surveymonkey.com/r/qtcreatorsurvey2024
https://redd.it/1fdjoyz
@qt_reddit
QML Canvas confetti animations 🎉 - open source QML module based on confetti.js
https://github.com/MeldStudio/canvas-confetti-qml
https://redd.it/1fdgqyy
@qt_reddit
Creating a QML C++ extension
I am trying to create a C++ extension for a QML app, but I can't get it to work. When I am running the QML app with qml app.qml
, I get the following error:
invalid version plugin, expected <major>.<minor>
Is there any open-source software developed with Qt that is similar to TeamViewer?
THANKS ALL!
I would like to refer to what technologies are needed for remote software development. Thank you very much~
https://redd.it/1fctxmn
@qt_reddit
Needed QT for a school project, but now it won't uninstall properly?
Downloaded QT for a school project. Once I was done, I tried uninstalling it but it remained in my Installed Apps list (Win 11) even after restarting my system. I tried searching the drive for any files related to QT that may have been left over but couldn't find anything. I eventually just redownloaded the tool suite and uninstalled it again, but it's STILL here. Any idea why?
https://preview.redd.it/nwm9gnvi2pnd1.png?width=842&format=png&auto=webp&s=f1c079daebbc4c1efd000a226d11f2f770efc60a
https://redd.it/1fceznf
@qt_reddit
Boot to Qt custom image
I'm still new at Qt and working on building a custom Qt Yocto image to put onto my Raspberry Pi for one of my projects. I need the image to have mosquito and I am currently following these steps to try and make a base image before I start adding mosuitto in.
I am following the steps in this https://doc.qt.io/Boot2Qt/b2qt-how-to-create-b2qt-image.html but it always errors out at the:
bitbake meta-b2qt-embedded-qbsp
These are the errors that I am running into:
ERROR: Task (/home/osbuild/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.41.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 551 tasks of which 471 didn't need to be rerun and 1 failed.
NOTE: Build completion summary:
NOTE: do_populate_sysroot: 12.5% sstate reuse(1 setscene, 7 scratch)
NOTE: do_deploy_source_date_epoch: 0.0% sstate reuse(0 setscene, 4 scratch)
NOTE: do_create_spdx: 0.0% sstate reuse(0 setscene, 3 scratch)
NOTE: do_create_runtime_spdx: 0.0% sstate reuse(0 setscene, 3 scratch)
NOTE: do_recipe_qa: 0.0% sstate reuse(0 setscene, 6 scratch)
NOTE: do_populate_lic: 0.0% sstate reuse(0 setscene, 4 scratch)
Summary: 1 task failed:
/home/osbuild/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.41.bb:do_compile
Summary: There were 2 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
I don't know if I am doing something wrong or where the issue originated. I am building it on a UTM Ubuntu 20.04 VM om my silicon mac. Would love some advice or tips!
https://redd.it/1fbfwml
@qt_reddit
Edit .qch files
I am looking for some help to understand how I can edit compiled qch files.
I have a bunch of qch files which works quite well with my app but it looks really old and outdated.
Anyway I can open the qch, edit the htmls and compile it back to qch all outside of the application? TIA
https://redd.it/1fb3jth
@qt_reddit
Linux notifications with Action Buttons
Hi, I have a Linux only QT C++ application. We use QSystemTrayIcon::showMessage()
to show notifications to the user. This works fine but it can only show a message and an icon (AFAIK)
Now I need to show 2 action buttons along with the message and icons inside the notification. I don't see a way to achieve this with QSystemTrayIcon
. How can I show buttons and actually anything I like inside the notification popup?
One possibility I see is to ditch QSystemTrayIcon::showMessage()
and replace it with a custom widget that emulated a notification popup.
Please suggest me the ideal way to achieve it. Thanks!
https://redd.it/1fb1gkd
@qt_reddit
Guide for migrating to Qt Quick from QtWidgets? When to use Quick?
I am trying to make a flowchart maker, so I need dragging of blocks.
I would like to make a feature-proof choice for the future.
I worked with C++ CLI form files before, it was awkwardly slow to add 10 buttons by code, I thought it was because it wasn't GPU accelerated, I don't know.
Then, I tried small projects with Qt Widgets and managed to get it working.
But then I started questioning Qt Quick and if it will provide benefits for future.
I couldn't even add a button in hours. I didn't understand how to use Qt Design Studio and Qt Creator, to work together and add a button to run a C++ function.
I have been digging through tutorials and chatgpt for hours. I don't have the slightest idea of what I am doing. Is there a great tutorial to get started?
For what requirements is it worth learning Qt Quick? Is draging item in flowchart enough animation to justify?
What functionality might I lack in Qt Quick, that I must be aware of?
Would really appreciate your help. 😊
https://redd.it/1fai7pl
@qt_reddit
Getting a QModelIndex from a QListView created by a delegate within a QTreeView
I'm making a tree view, and one column needs to list an unspecified number of things pertaining to that row, and I need to be able to select any of those things in that one column. I've been able to successfully write a delegate that will create a model and QListView for each row in that column, but now my challenge is figuring out how to access that QListView when it comes to interaction.
No matter what actions or custom context menus I try to write for those QListView objects created by the delegate, the only QModelIndexes I've been getting are ones that point to that row and column on the QTreeView, and not to the QListView contained within said cell, essentially making it completely isolated from the standpoint of user selection.
Is there a way to do what I'm trying to do? I'm not using QML. For some reason every Google result related to this question is about QML.
https://redd.it/1fa5lxc
@qt_reddit
"QVkKhrDisplayIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay")`
`qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvnc.so"`
`qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvnc.so, metadata=`
`{`
`"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",`
`"MetaData": {`
`"Keys": [`
`"vnc"`
`]`
`},`
`"archlevel": 1,`
`"className": "QVncIntegrationPlugin",`
`"debug": false,`
`"version": 394240`
`}`
`qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc")`
`qt.core.plugin.factoryloader: checking directory path "/usr/bin/platforms" ...`
`qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""`
`This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.`
`Available platform plugins are: offscreen, xcb, minimalegl, linuxfb, minimal, eglfs, vkkhrdisplay, vnc.`
`Aborted`
I try to launch qtcreator from debian 12, wayland and with the option :
`export QT_QPA_PLATFORM=wayland`
`./applicationexport QT_QPA_PLATFORM=wayland`
`./application`
I am new to wayland, and I don't understand why qtcreator can't launch ? Can you help me ?
https://redd.it/1fi2whs
@qt_reddit
Plugin cannot be compiled
I can't compile an empty (automatically generated) plugin. The problem is most likely in the files (or rather their including and linking). I have provided a short video showing the whole process.
Maybe the problem is that you need to build qtcreator from the sources that are in the qtcreator directory, namely qtcreator/Tools/QtCreator?
https://reddit.com/link/1fhj8tz/video/oepjvqrsl0pd1/player
https://redd.it/1fhj8tz
@qt_reddit
Screen Flickering while adding a new screen or deleting an objects from Screen.
With qt6 we started using Direct3D11
as Graphics api #ifdef USE_DIRECTX11
QQuickWindow::setGraphicsApi(QSGRendererInterface::Direct3D11);
#else
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
#endif
But with Direct3D11
when we add any screen or delete any item from the screen the screens flickers. But with OpenGL
it is working fine but due to some performance issue not using OpenGL
.
I'm hosting my application inside a windows form using ActiveX. We can add screen item using drag and drop on screen and deleting either through keyboard delete or right click then select delete option.
Any suggestion on this issue.
https://redd.it/1fftto2
@qt_reddit
Serial Port
Good afternoon
Hope everyone's having a great day, just one quick question. Does Qt have a universal code that detects COM port? Reason why I ask is I just got a new laptop and on my old laptop I had COM7 receive data from various microcontrollers via UART USB. And on my new laptop its using COM6 which worries me because when I release the GUI im not sure if Qt will detect the other laptops COM ports. So I'm asking and hoping if anyone knows a way to just ask Qt to detect the COM port that is using UART and just use it.
https://redd.it/1fele1q
@qt_reddit
Error on QT Yocto image , i got this bug and I can’t solve it
https://redd.it/1fdu219
@qt_reddit
Keyboard capture when using linuxfb?
I'm working on a project that would require 'Qutebrowser' to run on the linux frame buffer and and be controlled by a keyboard.
So far I've found that I can get Qutebrowser to load by setting the environmental arguments QT_QPA_PLATFRORM="linuxfb:fb=/dev/fb0"
but, I cannot interact with the browser or underlying system as the keyboard inputs are no longer captured.
I've been reading the Qt docs here and here, and have tried setting QT_QPA_KEYBOARD_PARAMETERS="grab=1:/dev/input/event0" and QT_QPA_FB_DISABLE_INPUT="1"
in an attempt to force the use of Qt's evdev tools as apposed to libinput and specifically use the keyboard.
So far no luck, and I have to hard boot the system to get back to a terminal.
I'm using the debian repo supplied version of Qutebrowser, would I need to rebuild it from source to incorporate libinput?
https://redd.it/1fdkjpx
@qt_reddit
Need Help with QtMQTT
Good morning everyone, I'm a novice in programming with QT, and I was getting into writing my first program based on the use of the MQTT standard.
Unfortunately I'm encountering a problem, i.e. when I create the object I get an "undefined reference" error.
The library was installed using the QT Maintenance Tool with the Linux operating system.
Does anyone know the probable cause? I specify that I am working with a console application, therefore without the .pro file or graphical interface at the moment.
Thanks in advance for any replies.
(I attach the block of code that gives me the error)
\`\`\`
void Client::setup(){
qint16 port;
mclient = new QMqttClient(this);
QTextStream host(stdin);
QString hostname = host.readLine();
mclient->setHostname(hostname);
std::cin >> port;
mclient->setPort(port);
qDebug() << "porta e host settati.";
}
```
https://preview.redd.it/35jz5enr0znd1.png?width=1023&format=png&auto=webp&s=91f1d6a1768c5834f0f715bdc72a8f02b05a8c58
https://redd.it/1fdfzok
@qt_reddit
Seeking Help to Optimize Python Image Processing Code for Large Datasets (100GB+)
Hi everyone,
I’m working on a PyQt5 application for a project in which it handles a large volume of images (We are talking about 100GB+). The app needs to upload and then process these photos through an AI detection model which detects a particular animal. I have made these features however, I’m currently facing issues with performance and stability when dealing with any amount of large photos.
I have implemented QThreading into these 2 functions of uploading the images and then processing images which only helps in the lower storages.
To summarise the project:
Workflow:
1. Image Upload: Selects and uploads images from a folder.
2. Image Processing: Processes each image with a detection model and saves the results.
3. Display: Shows the images on the UI with pagination.
4. Download: Allows users to download the processed images.
Problems:
• Performance: The application runs very slowly with large datasets, often resulting in crashes.
• Memory Management: Handling 100GB+ of image data is causing high memory usage.
• Progress Updates: The progress bar and image display update slowly and may not be responsive.
Current Implementation:
• ImageUploadingWorker: Handles image upload and display.
• ImageProcessingWorker: Processes images using OpenCV and a custom detection model.
If anyone is able to point me in the right direction and how I may go about solving this issue it would really be appreciated :)
https://redd.it/1fdekch
@qt_reddit
qmake not present in latest installer version?
hi all
I'm on a laptop with opensuse 15 tumbleweed and I installed Qt via online installer. I selected everything (at least I think) about Qt 6.7.X (including qt creator 14.1) and it installed everything apart from qmake. I can't find it. It was usually somewhere under the tool folder. Now I just can' find the designstudio one, but it is not the correct version.
What am I missing? has qmake been removed in the last installer versions?
Cheers
https://redd.it/1fcor2j
@qt_reddit
Drawing line with alpha channel not working
Code is simple: the line should be alpha blending... but I see it solid. I am missing something trivial:
c++
auto lineLengthEdgeColor_ = QColor(0x20ff2200),
painter->setPen(Qt::NoPen);
painter->setBrush(QBrush(lineLengthEdgeColor_));
painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
// painter->setPen(QPen(QBrush(lineLengthEdgeColor_), 0));
painter->drawLine(rect.topLeft(), rect.bottomLeft());
windeployqt not copying all DLLs required - MSYS/MinGW
Hello there! Recently I've been working on a project with Qt and I'm trying to test how to deploy using windeployqt and inno setup to make an installer package, but I've noticed a few DLLs used in my project aren't being added by windeployqt, like libstdc++-6.dll for example, and others from libraries like fluidsynth and portaudio which where installed through MSYS/MinGW shell via pacman.
I know that it is also possible to static link the c++ library but I'm not able to do that as fluidsynth and portaudio are shared libraries and refuse to link with the static flag in cmake.
Is there any way to go around this as I'm unsure of what further DLLs I may miss when copying them manually...
https://redd.it/1fb3iu1
@qt_reddit
Qt Design Studio does not include FakeVim plugin anymore
Maybe someone knows if this change is permanent or the FakeVim plugin may come back in future?
Cannot find any information about this change on the Internet.
https://redd.it/1fb1jo2
@qt_reddit
Themes Changes and Ideation
Hello Senior Developer, I have a task to create a strong theme changing system on already existing qt application. We have more that 8 themes, with each themes having approx. 8 color shades palette. I know some ways to implement it, but I want to know what's the best practice. And if anybody has, by any chance, has work on something similar how did you approach. What to keep in mind, tips and tricks are what I seek.
Thank you so much !
https://redd.it/1fal4od
@qt_reddit
Responsive App Design in QML - QLayoutItemProxy
Wrote a little guide for those seeking ways to do responsive apps in QML. For this, you'll need at least Qt 6.6.
Responsive Apps in Qt/QML
https://redd.it/1fabmfn
@qt_reddit
Understanding the Layout Process in Qt Widgets
https://felipefarinon.com/articles/qt-widgets-layout/
https://redd.it/1f9txxy
@qt_reddit