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

QtQuick.Controls package for Gnome/Adwaita

Hello guys,

I'm looking for a QtQuick.Controls style that changes the design to Gnome/Adwaita. Is someone working on that or has someone just created a package like that?

I know packages like adwaita-qt, but they seem to work with Qt Widgets only.

Thanks in advance for any hints.

https://redd.it/18odvia
@qt_reddit

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

Qt - Reddit

Need resources to study basic QT applications

I am in urgent need to understand QT and construct an application on it... are there any good methods to study it... I am currently facing stupid obstacles like not being able to orient the label the way I like and such... Any help is appreciated

https://redd.it/18npc3s
@qt_reddit

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

Qt - Reddit

QT UI Design Responsive without empty when we change the display resolution


My Qt application's UI is not responsive or the contents don't fit properly. How can I make it more responsive and eliminate empty spaces? Should I use Qt Creator or Qt Designer for this? I need a practical yes/no answer with a detailed explanation and a solution to the root cause.

#QtCreator #QT Designer #QML #QT tool #qt UI

View Poll

https://redd.it/18njo12
@qt_reddit

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

Qt - Reddit

geerate a token in c++

i want to create a jwt token using c++, any one can provide me some sources codes

https://redd.it/18n6uko
@qt_reddit

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

Qt - Reddit

What widget should I use that would output text based data?
https://redd.it/18mdj5e
@qt_reddit

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

Qt - Reddit

resize QGraphicsScene with its items

i currently manually calculate the resized scales and positions in overrided resizeEvent function, its able to work but is there any better way than a for loop? thanks for any advice

https://redd.it/18lzf99
@qt_reddit

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

Qt - Reddit

QML ChartView and QVariantList

I have a QVariantList property in a C++ class, which contains a number of struct{float x, float y}. Currently I can plot these on a QML ChartView by using the onCompleted() signal, and manually populating a SplineSeries, but that does not feel like the right thing to do. The underlying C++ object also updates the plotted property.

What would be the correct way of displaying the QVariantList on the ChartView?

https://redd.it/18lvy65
@qt_reddit

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

Qt - Reddit

Librum - A modern e-book reader (Beta Release)

Librum is a Qt, Opensource and Cross-platform e-reading platform to store, manage and read e-books on any device: https://github.com/Librum-Reader/Librum.

https://preview.redd.it/lvewa0zsn07c1.png?width=1920&format=png&auto=webp&s=ca3a644dddafe4d1f320bddae0e7c1b115d559b5

We are happy to announce that Librum is now officially beta released.From the last time that I have shared Librum here, we have added:

\- Translations
\- Bookmarks
\- Self-hosted version (including instructions to set it up)
\- An in-App dictionary
\- An in-App Ai explanation feature

and much more.

Librum is in very active development and we are always looking for new contributors.We are currently working on the Android version to finally add official mobile support and are always open to feedback and new ideas (reach us at contact@librumreader.com).

If you would like to translate Librum into a different language, please visit the translations section on our Github page.

If you would like to support or contribute to Librum, please visit our website.

https://redd.it/18l45h7
@qt_reddit

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

Qt - Reddit

[Noobquestion] How to make a minimalistic QT stylesheet?
https://redd.it/18kler6
@qt_reddit

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

Qt - Reddit

Trying to insall PyQT6 on redhat linux

Hello people, trying to install PyQT6 on redhat linux 9 with no success, I keep getting an error when I try and run the .run file. I changed the file permissions to executable etc and the error message simply says: cannot execute binary file

I installed successfully on the latest ububtu however my redhat skills are woefull under developed. Aby assistance appreciated. Dome of the commands I have tried are:

sudo chmod +x qt-unified-linux-x64-4.6.1-online.run (this works)

sudo sh ./qt-unified-linux-x64-4.6.1-online.run

Not sure where to go from here, my google search doesnt come up with much that is very recent at all.

​

Thanks!

https://redd.it/18kb6r6
@qt_reddit

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

Qt - Reddit

QtCreator better switching between windows/splits - new plugin

If You work with multiple code windows, you often need to switch between them.You can use your mouse, but at last I don't like to search for it.QtCreator offers to switch only to "next" or "previous" (with CTRL+E,I or CTRL+E,O) window and I never remember which is next or previous.

Vim offers quit nice way to switch between "splits", just pres CTRL+W,[hjkl] and you can easily switch to left (h), bottom (j), up (k) and right(l) split.

If only QtCreator had something like this...

So instead of waiting for it to happen, I've created a small plugin for this behavior:

https://github.com/RockFordgt/VimFrameSwitcher

​

it allows to witch between splits (and opened code widows) just by jumping to the left/right/up/down from the current cursor positions.

default sequences are CTRL+E,<hjkl> (to be consistent with Qt it starts with CTRL+E and hjkl are from vim) but if you would like to change the bindings you can do that in Preferences->Environment->Keyboard just search for "VimFrameSwitcher"

https://redd.it/18jvt6f
@qt_reddit

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

Qt - Reddit

CMake debugger in Qt Creator 12 tutorial
https://www.youtube.com/watch?v=nuleqMzh4kw

https://redd.it/18jrqwb
@qt_reddit

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

Qt - Reddit

Qt designer gui looks different than the python script, why?
https://redd.it/18jehkx
@qt_reddit

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

Qt - Reddit

Anyone starting new (commercial) desktop projects in Qt Widgets?

Does anyone start new commercial projects in Qt Widgets nowadays? Targeting desktop platforms.

https://redd.it/18iw88s
@qt_reddit

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

Qt - Reddit

#20 0x00007f39d3978006 n/a (libQt6Core.so.6 + 0x378006)
#21 0x00007f39d37b9ec9 n/a (libQt6Core.so.6 + 0x1b9ec9)
#22 0x00007f39d3948d97 _ZN18QAbstractItemModel13endResetModelEv (libQt6Core.so.6 + 0x348d97)
#23 0x00007f39d37b9ec9 n/a (libQt6Core.so.6 + 0x1b9ec9)
#24 0x00007f39d37c1f84 _ZN6QTimer10timerEventEP11QTimerEvent (libQt6Core.so.6 + 0x1c1f84)
#25 0x00007f39d37a53b6 _ZN7QObject5eventEP6QEvent (libQt6Core.so.6 + 0x1a53b6)
#26 0x00007f39d477319b _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt6Widgets.so.6 + 0x17319b)
#27 0x00007f39d3762a78 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt6Core.so.6 + 0x162a78)
#28 0x00007f39d38c8236 _ZN14QTimerInfoList14activateTimersEv (libQt6Core.so.6 + 0x2c8236)
#29 0x00007f39d399e90c n/a (libQt6Core.so.6 + 0x39e90c)
#30 0x00007f39d250df69 n/a (libglib-2.0.so.0 + 0x59f69)
#31 0x00007f39d256c327 n/a (libglib-2.0.so.0 + 0xb8327)
#32 0x00007f39d250c162 g_main_context_iteration (libglib-2.0.so.0 + 0x58162)
#33 0x00007f39d399d074 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x39d074)
#34 0x00007f39d376cf5e _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x16cf5e)
#35 0x00007f39d3765518 _ZN16QCoreApplication4execEv (libQt6Core.so.6 + 0x165518)
#36 0x000055e55dc124a3 n/a (qtcreator + 0xc4a3)
#37 0x00007f39d3045cd0 n/a (libc.so.6 + 0x27cd0)
#38 0x00007f39d3045d8a __libc_start_main (libc.so.6 + 0x27d8a)
#39 0x000055e55dc13915 n/a (qtcreator + 0xd915)

```

Anyone else see this? Any thoughts about how to fix it?

(FWIW I did file a bug. No traction yet)

https://redd.it/18gvrh9
@qt_reddit

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

Qt - Reddit

MOC question

Every time I update something in the UI form I have to rerun the MOC (it pops up a warning as in the image). This wasn't happening before, it seemed to be automatic up until now. I don't remember changing anything to induce the error. Has anyone seen/fixed this? I'm sure it's just a checkbox somewhere but I haven't found it :)

&#x200B;

https://preview.redd.it/vpi3gt01gs7c1.png?width=688&amp;format=png&amp;auto=webp&amp;s=65bc93ac4fa179e37ac6b85f4a10455dbca16928

&#x200B;

Qt Creator 12.0.0. / Qt 6.6

https://redd.it/18o85yx
@qt_reddit

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

Qt - Reddit

Qt binary mirrors?

Are there any known mirrors where I could download Qt and Qt Creator binaries apart from qt.io?

https://redd.it/18npf0q
@qt_reddit

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

Qt - Reddit

Any Tesla devs lurking who know if this was made with QtQuick/QtQuick3D?
https://youtu.be/BGDOKD7ZZqI?si=DHmXUwCxY7AC1ZNs&amp;t=1999

https://redd.it/18na7sn
@qt_reddit

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

Qt - Reddit

3 Frames of input lag?

Hi there, I am making a C++ game in Qt and QML and I've been able to measure at least three frames of delay between my reading the input and the screen reflecting it. I measured against another game that I know has 1 frame of delay.

&#x200B;

My setup is this:

&#x200B;

I have an object Game that extends QQuickPaintedItem. Game has a connection to the window's beforeRendering signal, which is where input is read and the image data is created. Game also overrides the paint method where it writes the image data to a QImage and then paints it with QPainter.

&#x200B;

I imagine one frame is from the paint call not directly following the beforeRendering call, as in it gets queued for the next loop, but I'm stumped on anything else it could be.

&#x200B;

I don't have any reason to think that any frame is taking longer than 16.6ms as I measure it and print an error if it is above 20ms. Any help I could get would be greatly appreciated!

https://redd.it/18mfapl
@qt_reddit

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

Qt - Reddit

Configure Qt for 32-bit qreal for i.MX8?

I need to cross-compile Qt for i.MX8. I'm just starting. Will 32-bit qreal give better performance? Or is there a compelling reason to configure for 64-bit qreal?

I will not need more than 2GB of RAM. I don't think I need Qt with 64-bit support. This will be a QML UI. I want performance.

My ARM experience is all based on the 32-bit i.MX6. I mistakenly built Qt for my i.MX6 platform with 64-bit qreal type and when I figured out my mistake I got a 7% performance boost but rebuilding Qt configured for 32-bit qreal.

The smart answer is always: "benchmark first", but I'm lazy and I expect to take a long time getting Qt to build. Surely someone already knows whether it is worth configuring Qt for 32-bit qreal on i.MX8.

https://redd.it/18md4j7
@qt_reddit

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

Qt - Reddit

Build Error in ScriptableApplication with Shiboken on Windows

Hi, I'm trying to build ScriptableApplication, an example of Shiboken build system for C++/Python Bindings on Windows.

With Repository,

https://github.com/pyside/pyside-setup/tree/dev/examples/scriptableapplication

By Following:

https://www.youtube.com/watch?v=wOMlDutOWXI&amp;t=2184s

Instruction Followed:

cmake -B build   # Executed Successfully (But Makefile.txt is NOT generated in ./build)
cd build && make # Error: No targets specified and no makefile found.


And,

https://doc.qt.io/qtforpython-6/examples/example\_scriptableapplication\_scriptableapplication.html

mkdir build
cd build
cmake -H.. -B. -G Ninja -DCMAKE\_BUILD\_TYPE=Release # <--- Error


Error:
    FAILED: cmTC_f0b04.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_f0b04.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_f0b04.dir\testCCompiler.c.obj /out:cmTC_f0b04.exe /implib:cmTC_f0b04.lib /pdb:cmTC_f0b04.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_f0b04.dir/manifest.res CMakeFiles\cmTC_f0b04.dir/manifest.rc" failed (exit code 0) with the following output:
no such file or directory
ninja: build stopped: subcommand failed.


CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:12 (project)

-- Configuring incomplete, errors occurred!


Any Suggestion, How to build this application?

https://redd.it/18lxfnk
@qt_reddit

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

Qt - Reddit

Getting errors when making a new Qt project using CMake

I have been pulling my hair out for a couple of days trying to make a Qt project in Visual Studio. If I don't make a CMake project, but instead a normal one, everything works fine. Whenever I use CMake though, I can't build my project. I get weird errors like this you see in the image. I also get some warnings which I also attached.

When I click on the warnings though, I think I get a hint of what is going on. I see stuff like

mingwovr int cdecl vfscanfsl(FILE _File, const char Format, localet Locale, valist ArgList)
{
return stdiocommonvfscanf(CRTINTERNALSCANFSECURECRT, File, Format, Locale, ArgList);
}

I don't know what mingw is doing over there, but that is most likely the issue. I don't think I installed it wrong. In my path, the msvc qt directory is above the mingw one, but most importantly, in the qt tools extension, I put the path to the msvc qt directory.

What is this error and how do I fix it?

&#x200B;

the weird errors

&#x200B;

The weird warnings

https://redd.it/18lma2j
@qt_reddit

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

Qt - Reddit

WebAssembly

I have created a basic QML/QTcore software. I want to launch it on the web. I know I can do it with Webassembly.
Now, I am thinking,
- do I have to change my QML to something to make it as responsive as it was when I build it as a desktop app?
- if I have started a project with qtQuick application, do I have to change any configuration when i want to switch it to webassembly, because I haven’t do it with webassembly kit?
- I am very beginner to this concept, and I am not able to find resources for webassembly in Qt. Please give a link if you have any deployment processes.
- Does SEO works on QML while running on web, if yes what changes should I make or what basic idea do you suggest.

Thankyou so much!

https://redd.it/18kwmoz
@qt_reddit

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

Qt - Reddit

QFluentCharts: An Elegant Qt Charts Library
https://youtube.com/watch?v=3sZpI7P0wDw&amp;si=hYRk5sDkCnw6SKgp

https://redd.it/18kgbl8
@qt_reddit

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

Qt - Reddit

Wrapping model(s?) around existing data

I have a QList of Route objects. Each Route object has a QMap of <Stop*, StopData>. Each StopData object has a QList of Amenity objects. That there represents the hierarchy of my data, with each object having additional functionality I haven't described. Now, in a non-GUI application, the data held by each object can be updated trivially via setters. But, how would I go about displaying this data and providing a mechanism to insert/amend, etc, via multiple list views?

&#x200B;

What I had in mind was three list view: the first showing the list of Routes. The second showing all the Stop keys for the selected Route. And the third showing a list of Amenities for the selected StopData.

&#x200B;

What would be the best way to implement a model around this data? The hierarchy is effectively a tree structure, although one with limited depth. I've looked into subclassing QAbstractItemModel, but it might be overkill in this case. I also think it's important to preserve the composition and encapsulation I've established without deconstructing my data into TreeItems or some such.

&#x200B;

Another simpler idea would be to have three separate models for Route, Stop, and Amenity, and set the data on these accordingly, whenever an item is selected. Would this be terribly inefficient?

&#x200B;

Any suggestions would be greatly appreciated!

https://redd.it/18ka4hc
@qt_reddit

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

Qt - Reddit

What is this red border called? I added a placeholder property to my TextField and got this by default. I like it but I don't know how to change the color from red to something else.
https://redd.it/18jw0ma
@qt_reddit

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

Qt - Reddit

Qt Roadmap QtWS 23

https://youtu.be/rqX9lDsOeM0?si=0pn3XieuYvUmlJTC

https://redd.it/18jpcqg
@qt_reddit

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

Qt - Reddit

Multiselecting of directories

Whats the best of selecting multiple directories?
Currently, I'm using `QFileDialog` with `QFileDialog.FileMode.Directory` for selecting directories, but you can select only one directly in one go.
I've tried using another object `QTreeView` by making it a child of the original `QFileDialog` object, along with `QAbsractItemView.MultiSelection`, with this I can select multiple directories in one go but, it does not return them so kinda useless.

I want a way to select multiple directories in a dialog and return them as list.


https://redd.it/18j1k0v
@qt_reddit

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

Qt - Reddit

CLion - how to build and run Android Qt6 application with CMake

So far I can successfully build my code, but seems any APK is created, only libMyQtAndroidApp.so file must have some wrong CMake configuration.

Do you have successful setup for that?

I ~~hate~~ don`t like QtCreator, so I want to switch completely from it to CLion. For desktop all works good for me, but not for Android.

https://redd.it/18i5n0o
@qt_reddit

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

Qt - Reddit

Is anyone else seeing frequent segfaults in Qt Creator?

After upgrading to Qt Creator 12.0.0, I am seeing very frequent segfaults.

```
Dec 12 15:34:45 xxxxxx-laptop kernel: qtcreator[3202438]: segfault at 20 ip 00007f39d39751f8 sp 00007fff22f2eaa0 error 4 likely on CPU 8 (core 4, socket 0)
Dec 12 15:34:45 xxxxxx-laptop kernel: Code: 08 49 8d bc 24 e0 00 00 00 48 83 c6 78 e8 60 4e 01 00 48 89 e7 48 89 c6 48 89 d0 83 e2 7f 48 c1 e8 07 48 8d 0c c0 48 c1 e1 04 <48> 03 4e 20 0f b6 04 11 48 8d 15 e9 c9 00 00 48 c1 e0 05 48 03 81
Dec 12 15:34:46 xxxxxxx-laptop systemd[1]: Started Process Core Dump (PID 3203975/UID 0).
░░ Subject: A start job for unit systemd-coredump@8-3203975-0.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit systemd-coredump@8-3203975-0.service has finished successfully.
░░
░░ The job identifier is 13595.
Dec 12 15:34:54 xxxxxx-laptop systemd-coredump[3203976]: [🡕] Process 3202438 (qtcreator) of user 1000 dumped core.

Stack trace of thread 3202438:
#0 0x00007f39d39751f8 _ZNK21QSortFilterProxyModel6parentERK11QModelIndex (libQt6Core.so.6 + 0x3751f8)
#1 0x00007f39d489985e n/a (libQt6Widgets.so.6 + 0x29985e)
#2 0x00007f39d4aa9731 _ZNK9QTreeView16indexRowSizeHintERK11QModelIndex (libQt6Widgets.so.6 + 0x4a9731)
#3 0x00007f39d4aabd1c n/a (libQt6Widgets.so.6 + 0x4abd1c)
#4 0x00007f39d4aabfb0 _ZNK16QTreeViewPrivate17coordinateForItemEi (libQt6Widgets.so.6 + 0x4abfb0)
#5 0x00007f39d4a9ee3c _ZNK16QTreeViewPrivate10visualRectERK11QModelIndexNS_8RectRuleE (libQt6Widgets.so.6 + 0x49ee3c)
#6 0x00007f39d4a24592 n/a (libQt6Widgets.so.6 + 0x424592)
#7 0x00007f39d4a241fc n/a (libQt6Widgets.so.6 + 0x4241fc)
#8 0x00007f39d40f02b9 n/a (libQt6Gui.so.6 + 0x4f02b9)
#9 0x00007f39d4aa788c _ZN9QTreeView16selectionChangedERK14QItemSelectionS2_ (libQt6Widgets.so.6 + 0x4a788c)
#10 0x00007f39d37ba1cb n/a (libQt6Core.so.6 + 0x1ba1cb)
#11 0x00007f39d395b930 _ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2_ (libQt6Core.so.6 + 0x35b930)
#12 0x00007f39d395c6cd _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE (libQt6Core.so.6 + 0x35c6cd)
#13 0x00007f39d395992e _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE (libQt6Core.so.6 + 0x35992e)
#14 0x00007f39d395a144 _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE (libQt6Core.so.6 + 0x35a144)
#15 0x00007f39d489eff8 n/a (libQt6Widgets.so.6 + 0x29eff8)
#16 0x00007f39d489f1bf n/a (libQt6Widgets.so.6 + 0x29f1bf)
#17 0x00007f39d489f295 n/a (libQt6Widgets.so.6 + 0x29f295)
#18 0x00007f39d37b9ec9 n/a (libQt6Core.so.6 + 0x1b9ec9)
#19 0x00007f39d3948d97 _ZN18QAbstractItemModel13endResetModelEv (libQt6Core.so.6 + 0x348d97)

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