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

Why is QT creator so large on my Mac?

I just wonder, is the extra storage requirement worth it?

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

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

Qt - Reddit

How to export Design Studio project to Creator and Build.

I've tried everything I've found so far so this is my call for help. I'm throwing down the gauntlet in a desperate cry for help.

I've created a project in QT Design Studio, and when i got to actually building it as an .exe file, I've come to find out it isn't as easy as i thought. I've tried to open it from the CMake file and from .qmlproject file and when I try to run it, I get the same errors. When I build the project in Design Studio everything works just fine.

https://preview.redd.it/t11hjmzp7z2d1.png?width=2145&format=png&auto=webp&s=9e180987d6dd3db5e7ddcf01c59fa35b0d7c5fbf

https://preview.redd.it/aqqo1nzp7z2d1.png?width=2137&format=png&auto=webp&s=c0eed39b64aae65cb20d7e8df3d1824728e519cf

I've tried reinstalling the app, still in vain. I haven't used QT before, and it is perfect for my school project, but it will be all for nothing if i can't actualy build the project.

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

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

Qt - Reddit

Toggling ‘Return to Design’ in Qt Design Studio not as expected

1. Shift+F4 in Qt Design Studio does not toggle ‘Return to Design’

2. When you press ‘Return to Design’ in Qt Design Studio, it should switch between the designer view and the source code view. However, on macOS, it doesn’t behave as expected. Instead, it takes you back to the “Switch to Welcome mode.” Ideally, it should allow you to return to the coding mode.

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

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

Qt - Reddit

Problem with Qt in Visual Studio

Hi, I have a problem with Qt in Visual Studio.
No matter what type of new Qt project I create, whenever I open the .ui file and start to edit it, it closes by itself if I select anything (for example a push button) and press the right click on anywhere in qt visual studio tools.
I have the newest Visual Studio Community 2022 and the newest Open Source Qt.

I also don't know where/if there are any log files created.

It's getting tiresome to work on any project, so I appriciate some help.


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

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

Qt - Reddit

Using the native file dialogue on KDE

I'm having a confusing problem with Qt Quick/QML. I'm not sure if my problem lies with CMake, or Qt, or KDE.


I have an app that creates a FileDialog, but I can't find a way to get it to use the native Qt dialogue - instead, it's falling back to the Qt Quick implementation. However, when I preview that same QML file using qmlscene, it produces the correct behaviour. I've attached a video showing what I mean.



https://reddit.com/link/1d0tory/video/fa8er28h7p2d1/player

I've looked into solutions to this. One half-solution is to run the app with the environment variable QT_QPA_PLATFORMTHEME=gtk3, which uses the GTK 3 file dialogue - so it's a native dialogue, which I want, but it's the GTK one, and I'd prefer the Qt one. Setting QT_QPA_PLATFORMTHEME to qt5ct or kde has no effect.


I've uploaded the code used in the demonstration video here. It can be compiled using the standard CMake dance (mkdir build; cd build; cmake ..; cmake --build .)


According to the documentation, the behaviour when not using qmlscene is actually expected:

>A native platform file dialog is currently available on the following platforms:

>- Android

>- iOS

>- Linux (when running with the GTK+ platform theme)

>- macOS

>- Windows

But that doesn't explain why I get the native Qt dialogue when using qmlscene.

Is there any way to get the qmlscene behaviour with the native Qt dialogue in my compiled C++ application?


In case it matters, I'm using Fedora 40, KDE Plasma 6, under Wayland.

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

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

Qt - Reddit

Is Poppler supported in Qt WASM for pdf viewing

I have been working on my portfolio website for quite a while now. I have tried Qt WebEngine, Qt PDF, and Qt WebView. None of these work in WebAssembly, only in the desktop view. I am looking for a better alternative to display my PDFs in WebAssembly. If you have any ideas, please share. Thank you!

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

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

Qt - Reddit

Pyside6-deploy

Hey i've create an app using pyside6 and some extra library and now i want to deploy it into an exe file how can i acheive this the doc of pyside6 tell you to use pyside6-deploy but i'm facing problem using it (didn't find how to use it properly except the doc of pyside6 and didn't help a lot ) I've try pyinstaller and I've fave problem with missing packages ..thanks in advance

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

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

Qt - Reddit

Setting a QPixmap to a QLabel that is much larger than the QLabel

I am trying to set a Pixmap to a Label where the pixmap is about twice the size of the label. Neither of these can be resized to fit the other.

The Label is 20x20 px and the Pixmap has to be between 40x40px and 50x50px

Is it possible to create a pixmap like this or should I rethink my whole approach?

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

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

Qt - Reddit

advice about Qt for webassembly

Hello,

I've been a Qt programmer since 2017, I've written many stuff with it including my own web framework and my own UI components that works like charm.

I've tried web development before using html/js then laravel/blade and even angular.

I've almost forgot about them ever since, now that I'm back for a simple personal project, it seems they're a big hassle to work on, a simple web app requires you to setup a lot of things, apache, php, laravel and even node with npm even though I'm using blade templates but then u add breeze and more dependencies will follow like node.

then I move to the html side, I discover that very simple UI require a ton of html code to look nice and a lot of the templates use repetitive code, where as in QML, I'd just use repeaters and models, I can use similar paradigms in modern web frameworks, but the point is that these frameworks and the whole html/js technology seem to be broken by design being patched by tons of abstraction layers that eventually gets rendered to plain html and js.

so I'm just wondering, is it even worth it to invest time in html/js technology anymore, will WASM be more popular in the future or do you think support for it will be dead just like adobe flash and similar technologies?

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

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

Qt - Reddit

QAbstractItemModel Item Ownership for QTreeView

I'm starting an implementation of QAbstractItemModel in a C++ app I'm writing, mostly for myself. I've previously put together several such trees in PySide6, so I'm a little familiar with the model and view interaction. But in Python, I don't have to worry about little things like memory management...

So my question is about the philosophy of ownership of the model data. Most of the examples I've found use smart pointers (which are old but new to me!) for adding and accessing items within the data tree. E.g., using move(), unique_ptr(), etc. to transfer ownership. Considering the tree I have will be editable, is that the generally accepted way of implementing the data items in the model? Or is using, e.g., QList<Item> or QVariantList acceptable and good? I dunno if I'm making sense here...

My Python trees have all been more of a linked list situation except the nodes could have multiple children, of course, and item ownership never really comes up.

If anybody has any links to discussions about this, I'd sure love to read them. My Google Fu has not been nearly as productive as I would like.

Thanks!

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

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

Qt - Reddit

Openssl library ARM execution TLS and Incompatible version of OpenSSL Failure

Version : Qt5.14.2
Host : Ubuntu 22


I am trying to run an Application to use http url images(for display) that uses the openssl 1.1.1d version for the Qt Framework on the ARM platoform. I was able to build the openssl 1.1.1d for ARM and load the library into the device, also have set the ld path in the /etc/ld.so.conf. After all that, I have built and link the sample Application and it throws the following error

QSslSocket Build "OpenSSL 3.0.7 1 Nov 2022" qt.network.ssl: Incompatible version of OpenSSL (built with OpenSSL >= 3.x, runtime version is < 3.x) QSslSocket Version 0 supportsSsl false

I have also tried moved out the openssl 3.0 libraries to a tmp folder. But still it throws the same error. However I was able to build the openssl 1.1.1d on x86 and run the sample-Application with success using http url images.

QSslSocket Build "OpenSSL 1.1.1d 10 Sep 2019"

QSslSocket Version 269488207

supportsSsl true

What is going wrong on the deivce, is it the build steps or the device needs to configure properly? CMAKE for ARM, below the path is shown in the link file for both vars OPENSSL\_SSL\_LIB, OPENSSL\_CRYPTO\_LIB:

set(SSL_PATH "$ENV{SDKTARGETSYSROOT}/usr/local/lib")
find_library(OPENSSL_SSL_LIB
NAMES "libssl.so"
NAMES_PER_DIR
REQUIRED
HINTS ${SSL_PATH}
PATHS ${SSL_PATH}
NO_DEFAULT_PATH)

find_library(OPENSSL_CRYPTO_LIB
NAMES "libcrypto.so"
NAMES_PER_DIR
REQUIRED
HINTS ${SSL_PATH}
PATHS ${SSL_PATH}
NO_DEFAULT_PATH)
set(CMAKE_INSTALL_RPATH "/usr/local/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_executable(helloworld main.cpp mainwindow.cpp mainwindow.ui resources.qrc) target_link_libraries(helloworld-image
Qt5::Core
Qt5::Network
Qt5::Widgets
${OPENSSL_SSL_LIB}
${OPENSSL_CRYPTO_LIB})



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

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

Qt - Reddit

Can someone help with this? QProperty as a member of a Singleton

I need to mover forward or choose another project.

Unfortunately i stated to my adviser I could do that... but I'm stuck.

https://forum.qt.io/topic/156765/qabstractlistmodel-as-member-of-qmlsingleton-in-python-not-working/3

Thanks in advance!

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

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

Qt - Reddit

Adobe Illustrator like Pen Tool on a QGraphicsScene

Thought I'd come on here and ask this:

How would I create an Adobe Illustrator like pen tool for my QGraphicsScene? (e.g. click point by point to define the geometry and click and drag to draw curves)

I am familiar with QPainterPath and it's respective methods, but I came here to ask how the hell I would achieve this. Any help is appreciated.

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

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

Qt - Reddit

Cahier - Advanced note-taking with bibliography management (v0.5.0 release)

Hello!

Cahier is the app that I've been developing for a year and a half, written using Qt. It is a knowledge base created to support out of the box the research workflow. It allows you to both store and read study documents (PDFs, web pages, etc.), extract and link highlights from those documents, and produce written content based on them.

It's a local-first, native application for Windows and macOS.

v0.5.0 introduces better support for highlight links. Notes can be linked to highlights using cards. The startup speed is better. We've recently also added Markdown export in notes and improved the design of macOS apps.

For a more comprehensive list of changes, check our Twitter. Download the software here.

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

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

Qt - Reddit

Qt 5.15 LTS on Windows without a Qt Account
https://raymii.org/s/tutorials/Qt_5.15_LTS_on_Windows_without_a_Qt_Account.html

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

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

Qt - Reddit

I wrote a quick tool called "QFileTypeReport". It recursively reads a directory and breaks down the file sizes by mime type
https://gitlab.com/DesiOtaku/QFileTypeReport

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

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

Qt - Reddit

KDAB GammaRay how to inspect Qt apps tutorial for beginners
https://www.youtube.com/watch?v=gjX8vFlur3g

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

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

Qt - Reddit

How can I integrate a Qt Design Studio project with a c++ code?

A screenshot from Qt Design Studio with the project files tree.

All the tutorials I saw didn't help me. These just confused me. I want to interact with the objects in my project. Ask if any details needed! I am on Linux Ubuntu by the way.

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

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

Qt - Reddit

QML's TextField doesn't have elide feature?

Hello,
I want to elide text in the TextField. But turns out it doesn't have that feature. Any suggestions would be helpful.

Code:

TextField {
id: textField
Layout.preferredWidth: 200
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
verticalAlignment: TextInput.AlignVCenter

property string fullText: ""
placeholderText: "Search music"
placeholderTextColor: Qt.lighter("white", 0.6)

color: "white"

background: Rectangle {
anchors.fill: parent
color: "transparent"
}

wrapMode: TextInput.WordWrap // IDK what this one does
selectedTextColor: "#ffffff"
selectionColor: "#1d545c"
font {
styleName: "Regular"
pixelSize: 18
family: "Arial"
}
text: metrics.elidedText
onTextEdited: fullText = text

TextMetrics {
id: metrics
font: textField.font
elideWidth: textField.width - 10
elide: textField.focus ? Qt.ElideLeft : Qt.ElideRight

text: textField.fullText
}
}

This is what I've done so far. I tried using TextMatrics. But couldn't store the full text. Because there's only one text property used to display and contain the full text in TextField. You'll have to change that when eliding and the full text is lost.

Tried using Text to display on top of TextField. But you can't use the selection features then.

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

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

Qt - Reddit

WASM - Hosing

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

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

Qt - Reddit

Need technical documentation about Qt

Hi , I am trying to make a report on Qt , and I need some information about Qt technology, and how things work in Qt , architecture, technology, concepts, and features...etc .

Thanks

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

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

Qt - Reddit

How to Show Context Menu Options for PyQtGraph Plot Without Right-Click?

Hi,

I'm working with PyQtGraph and I'd like to know if there's a way to display the context menu options for a plot without requiring a right-click. Ideally, I'd like to replicate these options in a toolbar or menu so users can access them directly.

I know that this kind of functionality is available in Matplotlib, where we can create a navigation toolbar to provide similar options. Is there a way to achieve this with PyQtGraph?

Thanks in advance for your help!

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

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

Qt - Reddit

PySide6 GUI with Thread-Safe Plotting

Hello everyone,

I'm working on a PySide6 GUI application, and I'm looking for some guidance on implementing a specific feature. Here’s what I want to achieve:

* The main window of the application has a button.
* When the button is clicked, a new window should appear.
* This new window will plot some x and y data.
* The plotting should be in a thread separate from the main window, ensuring thread safety.
* x and y data should be safely passed from the main window to the plotting window.

I am new to PySide6 and am looking for the best approach to handling thread-safe updates to the plot in a separate thread.

Any code examples, tips, or pointers on how to implement this would be greatly appreciated!

Thanks in advance for your help!

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

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

Qt - Reddit

Serialize and Deserialize QGraphicsScene?

Hey all. I would like to achieve exactly what the title is (file saving and opening) for my QGraphicsScene. I was curious how I can do this with JSON or XML (whichever is easier)

Any help is appreciated.

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

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

Qt - Reddit

What if Qt 7 was rewritten in Rust?

Rust is an increasingly popular language lacking a good UI framework.
Qt is one of the most complete UI frameworks.

Would it be a good idea to rewrite Qt in Rust? Too difficult? Pros and cons?

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

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

Qt - Reddit

Qt 6.7.1 Released
https://www.qt.io/blog/qt-6.7.1-released

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

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

Qt - Reddit

plasmoid does not save login credentials

can someone help me with this !! plasmoid does not save login credentials

it is in github so ,,,

ISSUES

https://github.com/samirgaire10/com.samirgaire10.chatgpt-plasma6/issues/1

source code
https://github.com/samirgaire10/com.samirgaire10.chatgpt-plasma6

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

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

Qt - Reddit

How can I integrated a Qml project to Android studio project

I have a qt quick project management by Qt creator. It can direct building to a apk. But I have seen someone
Use android java code to start a qt quick project.How to do that? Someone tell more information, thanks a lot !

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

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

Qt - Reddit

Help identifying a crash

Hi,

I am debugging a crash, which I cannot understand. The way I can reproduce this is:

        QString l = "\r";
QChar c = l[0];


This crashes inside the operator, relevant code from 6.7.1:
const QChar QString::operator[](qsizetype i) const
{
verify(i, 1); // this one fails me
return QChar(d.data()[i]);
}

Q_ALWAYS_INLINE constexpr void verify([[maybe_unused]] qsizetype pos = 0,
[[maybe_unused]] qsizetype n = 1) const
{
Q_ASSERT(pos >= 0);
Q_ASSERT(pos <= d.size);
Q_ASSERT(n >= 0);
Q_ASSERT(n <= d.size - pos); // here d.size is 0!!!11
}


Code does work if I change l = "1". What am I missing here?

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

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

Qt - Reddit

Qt Zipfiles

I am new to Qt and have a project that needs to be migrated to Qt 6. In our project, we normally use QuaZip, but I think we need to switch to QZipReader and QZipWriter from the Qt framework. Will this migration be straightforward? Are there any functionalities in QuaZip that QZipReader and QZipWriter do not support?

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

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