qt_reddit | Unsorted

Telegram-канал qt_reddit - Qt - Reddit

-

News and discussion for the Qt Framework. Subreddit: https://www.reddit.com/r/QtFramework Powered by : @r_channels & @reddit2telegram

Subscribe to a channel

Qt - Reddit

How to implement dynamically created widgets?

TL;DR : What code and where do I have to write to create widgets from editing a .ui template and then order them in a layout?

I'm making a project for school: I need to create a pseudo shoe reseller e-store. I made, between other things, a "seller" page where a user can add a shoe they want to sell with all the relative details: name, brand, picture, sizes and price mainly.

I want to make a "buyer" page that takes every shoe's data and with them fills in a space in my layout with a template edited depending on the data. I don't really think an example is necessary, but if the seller has put on the market a Adidas Superstar with a "superstar.png" linked, three 37s and five 40s (in european sizes) at €60 each pair, I want the .ui template widget's fields to contain the shoe's data. Then, probably on a 3 column grid layout, I want to fill the grid with the edited .ui templates first going side to side and then moving to the next row.

I'm really unfamiliar with Qt, don't quite understand the yt tutorials that I found and the other questions on dynamically creating widgets on this sub don't really go in detail enough for me, almost completely unfamiliar with the framework, to figure out what to write. Can someone help?

https://redd.it/1kr8oj2
@qt_reddit

Читать полностью…

Qt - Reddit

QML extension type can't resolve properties

I'm trying to create a custom dialog, which seems to be wasting unexpected amount of my time.

// CameraDialog.qml
import QtCore
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Dialogs

Dialog {
id: root

property string source: ""

implicitHeight: 150
implicitWidth: 100

title: "Select a Camera"
standardButtons: Dialog.Ok | Dialog.Cancel

readonly property list<string> sources: ["Local File", "Remote Camera"]
readonly property list<string> placeholderForSource: ["Enter file path here", "Enter camera url here"]

ColumnLayout {
anchors.fill: parent
anchors.margins: 30
clip: true

ComboBox {
id: sourceComboBox
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft | Qt.AlignTop

model: root.sources
}

RowLayout {
Layout.alignment: Qt.AlignLeft | Qt.AlignTop

TextField {
// Layout.fillHeight: true
Layout.fillWidth: true
placeholderText: root.placeholderForSource[sourceComboBox.currentIndex]
}

Button {
Layout.preferredHeight: 40

visible: sourceComboBox.currentIndex === 0
text: "Browse"
onClicked: function () {
fileDialog.open()
}
}

// TODO: Force video file selection by formats
FileDialog {
id: fileDialog

currentFolder: StandardPaths.writableLocation(StandardPaths.MoviesLocation)
onSelectedFileChanged: root.source = fileDialog.selectedFile
}
}
}
}


and I'm using it like this:

pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtMultimedia
import APSS

Page {
id: root

signal stopped()

ColumnLayout {
anchors.fill: parent
anchors.margins: 20
spacing: 10

// Video Playback Screen
Rectangle {
Layout.fillHeight: true
Layout.fillWidth: true
color: "black"

VideoOutput {
id: videoOutput
anchors.fill: parent
}

ListView {
id: detections

anchors {
left: parent.left
bottom: parent.bottom
right: parent.right
margins: 10
}
height: 110
spacing: 10
// model: apssEngine.licenseplatePaths
clip: true
orientation: Qt.Horizontal
delegate: Rectangle {
width: 160
height: detections.height
color: "#D9D9D9"
}
}
}

Row {
spacing: 10
Layout.alignment: Qt.AlignHCenter

Button {
id: selectButton

text: "Select"
onClicked: function () {
cameraDialog.open()
}
}

CameraDialog {
id: cameraDialog

modal: true
onAccepted: function () {
apssEngine.openAFootage(cameraDialog.source, videoOutput.videoSink)
}
}
}
}
}


Neither of CameraDialog properties are accessible when used in other qml files, including inherited ones. Why?

Windows 11
Qt 6.9
MSVC 19

https://redd.it/1kpnfxi
@qt_reddit

Читать полностью…

Qt - Reddit

Dragging from QTreeView outside of app always delete the item dragged

I made an application with many independent widgets. I implemented drag & drop within the app so I can move items from treeviews to other treeviews. I can also reorganize a tree by dragging. The data is represented as JSON, encoded with mime: application/json. My models

Everything works as it should, but when I drag a tree item into another app, the source item is removed from my tree. I have no clue what mechanism do that

When I drag an item from a widget to another, I set the dropaction to copy. When I moved from within the same tree, I set the drop action to move. I have implemented a custom handler for both copy/move. I support no other action, meaning canDropMimeData and dropMimeData both returns False.

How can I prevent the deletion of the item in the source tree?

https://reddit.com/link/1koj500/video/7odylz4pg91f1/player




https://redd.it/1koj500
@qt_reddit

Читать полностью…

Qt - Reddit

Issues with Qt 6.8 and FFmpeg on iOS - Anyone else stuck with the “Invalid Swift Support” error?

Hey all,

I’m diving into iOS app development with Qt 6.8, and overall, things are running pretty smoothly. However, I hit a snag when it comes to deploying my app with Qt Multimedia’s new default FFmpeg backend. To get FFmpeg linked in, I’m using qt_add_ios_ffmpeg_libraries (also considering QTBUG-130488), which bundles the FFmpeg dynamic libraries into the package. Everything works on a development device—no issues there.

The problem comes when I try to upload to the App Store. I’m getting this dreaded “Invalid Swift Support - The Swift Support Folder is missing” error. After a bit of digging, I found out that App Store Connect seems to reject apps with .dylibs in the Frameworks folder. Manually deleting the Frameworks folder solves this issue, but then, of course, the app won’t run since it relies on FFmpeg.

So… has anyone else experienced this? It feels like a general issue for any iOS app using Qt Multimedia with FFmpeg, but I haven’t found a clear workaround yet. Sure, I could roll my own custom build of Qt without FFmpeg, but that defeats the point of having a default multimedia backend. Not exactly ideal for anyone looking to use Qt as a solid iOS dev platform, right?

Any tips or workarounds would be super appreciated!

https://redd.it/1gh5xb2
@qt_reddit

Читать полностью…

Qt - Reddit

Cant compile project with qmake on Ubuntu!

Hi everyone! I'm a complete newbie on Qt / qmake. I'm trying to compile a Qt project called JBlade on Ubuntu 24.04 with qmake. I've installed g++, build-essential, qt5-make, etc..., but I'm getting the following errors:

/usr/bin/ld: cannot find -lQGLViewer2: No such file or directory
/usr/bin/ld: cannot find -lOpengl32: No such file or directory

Thats how the end of the .pro file look like:

# for the libqglviewer
#________________________________
INCLUDEPATH *= $$PWD/src
CONFIG(debug, debug|release) {
LIBS += -L$$PWD/src/QGLViewer/debug -ldQGLViewer2 -lOpengl32
}
CONFIG(release, debug|release) {
LIBS += -L$$PWD/src/QGLViewer/release -lQGLViewer2 -lOpengl32
}

Any suggestions are welcome!

edit: thats the rep of the project: [https://github.com/MrTypename/jblade-code](https://github.com/MrTypename/jblade-code)

https://redd.it/1ggxtm8
@qt_reddit

Читать полностью…

Qt - Reddit

Cannot load library

While running the application either in debug or release mode facing below issue
Cannot load library C:\\Qt\\6.8.0\\msvc2022_64\\qml\\QtWebEngine\\qtwebenginequickplugin.dll: The specified module could not be found.

https://preview.redd.it/we4lmddx6nxd1.png?width=810&amp;format=png&amp;auto=webp&amp;s=08765888250d97e0cbdbe0692be3c90f9b4d0926

In the location the dlls are present


import QtQuick

import QtQuick.Window

import QtQuick.Controls

import QtWebEngine



Window {

width: 640

height: 480

visible: true

title: qsTr("Hello World")



WebEngineView {

settings.pluginsEnabled: true

anchors.fill: parent

url: "https://google.com"

}

}


Any solution of the above issue

https://redd.it/1geogmr
@qt_reddit

Читать полностью…

Qt - Reddit

Why VLC for iOS and android is not build using Qt?

I just noticed that vlc for windows is made using Qt while for android and ios were developed natively even though Qt is a cross platform framework. Any special reason for this?

https://redd.it/1gdtjh0
@qt_reddit

Читать полностью…

Qt - Reddit

Tilde symbol expansion to home directory in QCompleter with QFileSystemModel

Hello. I am using QLineEdit with a QCompleter connected to QFileSystemModel to let user navigate directories. I want to show the default completion behavior even if the directory path begins with a \~ (tilde) symbol on linux, which expands to the home directory. I tried the following codes:

connect(m_path_line, &FilePathLineEdit::textChanged, this, [&](const QString &text) {
QString expandedText = text;
if (text.startsWith("~")) {
expandedText.replace(0, 1, QDir::homePath()); // Replace ~ with home directory
m_completer->setCompletionPrefix(expandedText);
m_completer->splitPath(expandedText);
} else {
m_completer->setCompletionPrefix(text);
}
qDebug() << m_completer->completionPrefix();
});


Second approach which looked promising:

class PathCompleter : public QCompleter {
Q_OBJECT
public:
explicit PathCompleter(QAbstractItemModel *model, QObject *parent = nullptr)
: QCompleter(model, parent) {}

protected:

QStringList splitPath(const QString &path) const override {
QString modifiedPath = path;
if (path.startsWith("~")) {
modifiedPath.replace(0, 1, QDir::homePath());
}
return QCompleter::splitPath(modifiedPath);
}
};


This works for the most part, but let's say if I enter `~/.config/` then the completion doesn't show up, and I have to press backspace on the forward slash or add another slash and remove it to get the completion. Anyone know what's happening here ?

Thank you.

https://redd.it/1gd4zex
@qt_reddit

Читать полностью…

Qt - Reddit

Making a troubleshooting list for common errors so I can refer to it when I get stuck. Please let me know of anything you think I should add.
https://redd.it/1gc4vsy
@qt_reddit

Читать полностью…

Qt - Reddit

Bitmap fonts are invisible since updating to QT 6.8.0
https://redd.it/1gbhoyj
@qt_reddit

Читать полностью…

Qt - Reddit

Need a UI urgently

Can somoene please help me make a UI based on this code below
\#include <iostream>

\#include <vector>

\#include <cstdlib> // For rand() and srand()

\#include <ctime> // For time()



using namespace std;



// Function to find the maximum sum of a subarray using Kadane's Algorithm

pair<int, pair<int, int>> kadaneAlgorithm(const vector<int>& arr) {

int current_sum = arr[0\];

int max_sum = arr[0\];

int start = 0, end = 0, temp_start = 0;

for (size_t i = 1; i < arr.size(); i++) {

if (arr[i\] > current_sum + arr[i\]) {

current_sum = arr[i\];

temp_start = i;

} else {

current_sum += arr[i\];

}

if (current_sum > max_sum) {

max_sum = current_sum;

start = temp_start;

end = i;

}

}

return {max_sum, {start, end}};

}

// Function to generate a random array with positive and negative values

vector<int> generateArray(int size) {

vector<int> arr(size);

srand(time(0)); // Seed for random number generation

for (int i = 0; i < size; i++) {

arr[i\] = (rand() % 21) - 10; // Generates numbers between -10 and 10

}

return arr;

}



// Function to display the array

void displayArray(const vector<int>& arr) {

cout << "Array: [ ";

for (int num : arr) {

cout << num << " ";

}

cout << "\]" << endl;

}



// Main function to play the game

void playGame() {

int size = 10; // Size of the array

vector<int> arr = generateArray(size);

// Display the generated array

displayArray(arr);

// Calculate the maximum sum subarray using Kadane's Algorithm

auto result=kadaneAlgorithm(arr);

int maxSum=result.first;

int start=result.second.first;

int end =result.second.second;

// Display the optimal solution using Kadane's Algorithm

cout << "Optimal Subarray using Kadane's Algorithm: [ ";

for (int i = start; i <= end; i++) {

cout << arr[i\] << " ";

}

cout << "\] with sum = " << maxSum << endl;



// Game starts

int playerScore = 0;

int playerPosition = 0;

char choice;



cout << "\\nGame Start! Choose your starting point (0 to " << size - 1 << "): ";

cin >> playerPosition;



if (playerPosition < 0 || playerPosition >= size) {

cout<<"Invalid starting position! Game over." << endl;

return;

}

playerScore += arr[playerPosition\];

cout<<"You started at position " << playerPosition << " with initial score = " << arr[playerPosition\] << endl;



// Player chooses the path to move forward

while (true) {

cout << "\\nChoose direction (L for left, R for right, Q to quit): ";

cin >> choice;



if (choice == 'L' || choice == 'l') {

if (playerPosition > 0) {

playerPosition--;

playerScore += arr[playerPosition\];

cout << "Moved left to position " << playerPosition << ". Current score = " << playerScore << endl;

} else {

cout << "You can't move left any further!" << endl;

}

} else if (choice == 'R' || choice == 'r') {

if (playerPosition < size - 1) {

playerPosition++;

playerScore += arr[playerPosition\];

cout << "Moved right to position " << playerPosition << ". Current score = " << playerScore << endl;

} else {

cout << "You can't move right any further!" << endl;

}

} else if (choice == 'Q' || choice == 'q') {

cout << "You quit the game with a total score of " << playerScore << endl;

break;

} else {

cout << "Invalid choice!" << endl;

}

}



// Compare player’s score with the optimal score

if (playerScore == maxSum) {

cout << "\\nCongratulations! You matched the optimal score!" << endl;

} else {

cout << "\\nYour final score: " << playerScore << ". Optimal score was: " << maxSum << endl;

cout << "Better luck next time!" << endl;

}

}



int main() {

char playAgain;

do {

playGame();

cout << "\\nDo you want to play again? (Y/N): ";

cin >> playAgain;

} while (playAgain == 'Y' || playAgain == 'y');



cout << "Thanks for playing!" << endl;

return 0;

}







If someone knows any app that can quickly generate a ui for this please let me know i need to submit urgently

https://redd.it/1gavxlw
@qt_reddit

Читать полностью…

Qt - Reddit

A weather application python + Qt

https://preview.redd.it/pu30ev1gv6wd1.png?width=1364&amp;format=png&amp;auto=webp&amp;s=a3637e599982700e5f898da126da352459ae55fc

🌦️ Exciting Day Working on My Weather Application! 🌦️Today, I dove deep into developing a weather application, and it was an incredible opportunity to enhance my UI skills! While there’s still plenty of room for improvement, also tried to make it responsive, I learned so much throughout the process.✨ Here are a few key takeaways:1. UI Design Principles: Understanding the balance between aesthetics and functionality is crucial.2. User Experience Matters: Creating an intuitive interface can make all the difference for users.3. Problem-Solving: Every challenge I encountered taught me something new and helped sharpen my coding skills.I’m eager to keep refining my abilities and creating engaging applications. Stay tuned for more updates on my journey! 🚀hashtag#WeatherApp hashtag#UIDesign hashtag#LearningJourney hashtag#Python hashtag#Development hashtag#TechSkills

https://redd.it/1g939xn
@qt_reddit

Читать полностью…

Qt - Reddit

Qt Rapberry Pi

Hey everyone just have a quick quick question, I've been looking around I just see tutorials with Qt installed in Pi but im wondering if I could just use Qt in my laptop and upload my qt rapsberry project to it?

https://redd.it/1g8x43l
@qt_reddit

Читать полностью…

Qt - Reddit

A keyboard disable and enable utility developed with python and Qt

So I found myself needing to watch some tutorials and write down notes.....but then I didnt have enough space to write on so I decided to use my pc a a table lol...... but then didnt want my pc going all crazy coz its pressing all sorts of buttons

So developed this little guy here over the weekend...what are your thoughts, suggestions and roasts

https://github.com/TaqsBlaze/KeyLock

https://preview.redd.it/aar7gaq4t1wd1.png?width=520&amp;format=png&amp;auto=webp&amp;s=4143730a6c826fe3a569c119327dffd615dbc913



https://redd.it/1g8ire3
@qt_reddit

Читать полностью…

Qt - Reddit

Creating a 2FA Application for my PC using Qt and Python

So its been 3 days now working on this application of mine.....nothing fancy just a small simple 2FA for my pc... its about 80% done now with most basic functionality up and running

Now I need to figure out how to integrate this application with windows Auth to fire up as soon as the user logs in

and maybe adding a bit of random 2FA sessions during pc usage

to try it out theres a build in the release page:

Release 2FA - Version 0.0 Release · TaqsBlaze/2FA · GitHub

it's open source on github:

GitHub - TaqsBlaze/2FA: 2 Factor Authentication application for windows pc

https://reddit.com/link/1g6qdr4/video/ujygob7y2kvd1/player




https://redd.it/1g6qdr4
@qt_reddit

Читать полностью…

Qt - Reddit

What would you say about my vision of the desktop application user interface?

It's just MDI UI, but mdi subwindows are modal inside the mdi region. The user only interacts with the top subwindow. It help to avoid subwindows mess.

And it has tabs, in other words, the user can open as many instances of the application as needed.
Thanks

https://redd.it/1kqls5q
@qt_reddit

Читать полностью…

Qt - Reddit

set terminal file manager (yazi)

is there a way to make qt apps, such as qbittorrent,davinci resolve, etc. use tui file managers such as yazi?
i have xdp-filemanager1 set up, but qt apps seem to ignore it

https://redd.it/1koqaot
@qt_reddit

Читать полностью…

Qt - Reddit

Can not launch QT creator after installation

I can not open qt creator after successful installation.

I can run file assistant.exe, linguist.exe; both open a window when i click them.

However, I can not run qtcreater.exe file, someone help me, pls?🥹

https://redd.it/1ko1lii
@qt_reddit

Читать полностью…

Qt - Reddit

KDE Calligra 4.0 Qt6 office suite tutorial
https://www.youtube.com/watch?v=3zPBB4EZrxE

https://redd.it/1gh3id3
@qt_reddit

Читать полностью…

Qt - Reddit

PySide6: Click on an item in a List Widget to open a PDF File

I have a PDF Search App that allows me to search PDF files on my local device. Currently, I am displaying the results on a listWidget. What I want to do is when I click on a result in the listWidget, I have the option to open that particular PDF File in a PDF Viewer. How can I go about doing that?

https://preview.redd.it/j32wh9eii7yd1.png?width=749&amp;format=png&amp;auto=webp&amp;s=4fddda7dfd173ba7f5c8b0079759fd9f6cbdfa12

https://preview.redd.it/lyoxpccki7yd1.png?width=805&amp;format=png&amp;auto=webp&amp;s=1607ef04ce6e68c6a36bc10689e048c4c047b5ad

https://preview.redd.it/t49vb8jli7yd1.png?width=637&amp;format=png&amp;auto=webp&amp;s=a9356633f8316f0bb102bd3016eb3e0e435c594b

https://preview.redd.it/luk8mo0ri7yd1.png?width=811&amp;format=png&amp;auto=webp&amp;s=9540807b21b242ed9334608359606c004a95386a




https://redd.it/1ggw8qx
@qt_reddit

Читать полностью…

Qt - Reddit

QListView with widget based rendering

Hey, I have been using QListWidgets, using setItemWidget and setting their sizeHint based on the widgets im addings height. This has worked fine for me with small numbers of widgets. However, this time i could be dealing with 1000's of widgets to be displayed and i'm obviously taking a huge performance hit with creating a widget for each data point I have. I quite often have to re build the entire QListWidget as my data changes a lot.

I'm aware QListView should solve a lot of my issues, but do i really have to manually paint each item in the list using a delegate? I'd like to use widget based rendering as I have a UI framework built using QTWidgets, some of which are complex and I dont want to have to re-invent the wheel by rendering myself in a delegate.

Does anyone have suggestions for Widget based rendering in a scrollable list, where each widget can be variable height based on the type and contents of the data im adding?

Thank you in advance :)

https://redd.it/1gef0z4
@qt_reddit

Читать полностью…

Qt - Reddit

Proper backend in QML.

Hi,
Recently I am trying to develop some skills in QML. I know Qt a little bit, but most of knowledge is from widget style. I am working on simple image editor. I wanted do focus on creating UI with QML and make whole backend in C++ and also use (and learn) Model View pattern. I know that to most of editors, widgets are easiest way to approach but.. This is my "challenge" in learning QML.

Currently I have a little bit confusion with registering a class in QML. Most of tutorials shows that best way to register class is to use qmlRegisterSingletonInstance. I see that I need to create every instance of my class in the beginning of the program and register it into QML. But what if my app will grow into large app and I will have a lot of models? Do instantiate every model at beginning is really only option? Creating every object at the beginning seems to be a lot of memory cost.

I work since January in company that use Qt but app is very large and still don't get every aspect. In this app we have some sort of "Backend" thread that is connected to another thread resposnible for UI, and they talk to eachother. But I don't know if its good way so I try to learn by myself how to create apps.

My thinking is focused more or some Backend controller that will call needed object responsible for action that is called (most of like in widgets).

I see in internet that I can use setContextProperty but I saw also tutorial that tells that approach is not recommended.
Another method (from chatGPT xd ) is to use Factory pattern to create models on demand, but I am not familiar with this.

Do you have any advice how to create proper backend for QML without loosing performance and have it well organized? I appreciate every source of knowledge to build.

https://redd.it/1gdkgy2
@qt_reddit

Читать полностью…

Qt - Reddit

Can you make QTWidgets look modern?

First off I develop in python because it’s what I know the most. I know a little bit of c++ but nothing of the advanced topics (I just got pissed at fiddling with cmake and its issues I was having importing 3rd party libraries and gave up on C++ to learn rust as a second language lol)

I wanna start in game development in godot with a few friends for 2D and wanted to make my own sprite sheet editor for us to use to where it splits the cells into their own separate files for each frame. Godot might have this feature but I want a way to where I can do it in batches if needed if the files are the same dimensions. For example characters all with the same height dimensions of images to batch process.

Can you make nice clean modern flat looking interfaces in QtWidgets with custom title bars or should I start to learn QTQuick instead even though it looks like a bit more work but is much more flexible looking.

I could just do a quick and dirty dearpygui interface since it’s just for us mainly but if I ever publicly release it I would want it to look more polished than dearpygui “game development tool look”

Also I saw there’s QT.net but I’m not sure how much faster c# is than python (especially if I compile with cython and use cython static types) and if it’s even really updated for qt6 (python and c# where my first languages I’ve learned, while I haven’t used c# in a while it might all come back to me after using it after a while)

https://redd.it/1gcvhzc
@qt_reddit

Читать полностью…

Qt - Reddit

10 Tips to Make Your QML Code Faster and More Maintainable
https://www.kdab.com/10-tips-to-make-your-qml-code-faster-and-more-maintainable/

https://redd.it/1gbsm4b
@qt_reddit

Читать полностью…

Qt - Reddit

QML: anchors.centerIn vs anchors.center

I am currently making my very first experiments with QML (and Python + PySide) and already found something I cannot explain and cannot find any documentation or even mentions anywhere on the www (at least not with google)

I found an example here:

https://www.pythonguis.com/tutorials/pyside6-qml-qtquick-python-application/

(see the end of the posting for my code)

The provided example worked out of the box. I began experimenting with the version numbers in the qml import statements, they make no difference, at least not for what I am doing here. I used virtualenv to install pyside6 along with all libs it pulled in and the example (below) is working (and I don't know why).

Then I began looking for QML documentation and found this:

https://doc.qt.io/qt-6/qtqml-index.html

and for Text I found this: https://doc.qt.io/qt-6/qml-qtquick-text.html

My Version of Qt (or PySide6) seems to be 6.8 (installed with pip just 4 hours ago) and the above should be the correct documentation. Or is it not?

My problem is with the property

anchors.centerIn

I cannot find it in ANY qml documentation or mentioned ANYWHERE on the internet at all (except this example [which is working for unknown (to me) reasons!\]), even the search function on the Qt website will refuse to search for centerIn and instead changes my search query to center.

when I try to change it to

anchors.center

as it is mentioned in all documentations I was able to find during the last 4 hours it will error out with the following:

Cannot assign to non-existent property "center"

What am I missing? Where is the correct documentation?

my code currently looks like this (changed it back to centerIn):

# qml:

import QtQuick 6.8
import QtQuick.Controls 6.8
import QtQuick.Controls 6.8

ApplicationWindow {
visible: true
width: 600
height: 500
title: "HelloApp"
Text {
anchors.centerIn: parent
text: "Hello World"
color: "#ff0000"
font.pixelSize: 24
}
}

# python:

import sys
from PySide6.QtGui import QGuiApplication
from PySide6.QtQml import QQmlApplicationEngine

app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()

engine.quit.connect(app.quit)
engine.load('main.qml')
sys.exit(app.exec())

https://redd.it/1gb39ey
@qt_reddit

Читать полностью…

Qt - Reddit

Make Exclusive Checkboxes Uncheckable

Is there a way to make exclusive checkboxes uncheckable within Designer? If not, how would I do it using code?

At the moment I'm trying to use a toggle function but when I click the checkbox, it gets marked as checked and then runs the function.

    def oncheckboxtoggled(self, checked):
        sender = self.sender()
        if checked:
            sender.setAutoExclusive(False)
            sender.setChecked(False)
            sender.setAutoExclusive(True)

https://redd.it/1g9b1jn
@qt_reddit

Читать полностью…

Qt - Reddit

Qt6/Texeditor - qtedit4 - v0.0.2-beta

I will release "soon" version 0.0.2 of my text editor. Change log is visible on the site, read it there (added more config issues, that is more or less the change). I will enable automatic update next week (I hope it works... ).

* Windows users: you get an \*.exe installer.
* Linux users: you get an \*.appimage, download it and "chmod +x" it. Then from "Help" choose the command "Install desktop file" - this will make the editor available on KDE/Gnome.
* OSX users: help is wanted to support OSX. Should be relatively simple, as the code is Qt6+C++17.

Roadmap:

* v0.1.x Finalize the editor component of the IDE
* v0.4.x Better project management support
* v0.5.x Add support for LSP/DAP (language/debugger adapter/server protocol).
* v1.0.0 ???

[https://github.com/diegoiast/qtedit4/releases/tag/v0.0.2-beta1](https://github.com/diegoiast/qtedit4/releases/tag/v0.0.2-beta1)

https://redd.it/1g90d7o
@qt_reddit

Читать полностью…

Qt - Reddit

Android with Qt Creator

Android dev with Qt Creator?

I use Qt 5.12.7. I can't build to emulator because I don't know the compabilities. Qt Creator wants to install SDK 16.0 and NDK 25. Could somebody help me with knowing to right versions so I can use Android Studio to download it all?

https://redd.it/1g8r1wt
@qt_reddit

Читать полностью…

Qt - Reddit

QT Creator Project: I need to send e-mails.

Hi, I am a software engineer student and I applied to a hackathon arranged by a company and they send me a pre-task before the hackathon. I needed to do a project which is a data management system.

I did it almost all using QT Creater and cpp but I as a part of the task I need my project to send e-mails but I've never done a project alone and never made a program to send e-mails. I tried to download smtp client and tried to make it work but failed. When it comes to mess with the project files I get confused a lot. I downloaded smtp client for qt from github but couldn't manage to put write files in right directories or something.

I did the necessary changes to my .pro file but still my project couldnt see the source files, gpt said I needed a lib directory but the version I downloaded didn't have any lib files. Whatever I did I couldn't do it. Can anyone help me please?

https://redd.it/1g6tk5x
@qt_reddit

Читать полностью…

Qt - Reddit

Showcase of my free & open source Windows tool program (C++/Qt6)

Hey !
I present to you Scheduled PC Tasks
version 1.2 is up \^\^

Schedule automated simulations of actions you would perform on your PC.

Those actions simulations are available :

- Keys sequence
- Move Cursor
- Paste text
- Open files, folders, executables, url
- Run Windows system specific command (shut down, reboot, kill processes, create files...)
- Wait

And other features like data management, scheduled tasks at system startup...

Need your feedback :)

https://apps.microsoft.com/detail/xp9cjlhwvxs49p

https://reddit.com/link/1g6mpt9/video/9kvvn7m8njvd1/player




https://redd.it/1g6mpt9
@qt_reddit

Читать полностью…
Subscribe to a channel