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

Witch one is the best cross-platform framework, Qt or Electron?



https://redd.it/186itp8
@qt_reddit

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

Qt - Reddit

Does QT support advertising functions?

As a side project, I am creating a PC program using QT.

I want to insert an advertisement. Does QT support advertisement functions for PCs rather than mobile devices?

Are there any plans for advertising features in QT?

https://redd.it/186cjsr
@qt_reddit

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

Qt - Reddit

Display updating QImage in QML as fast as possible

Hi,

My QML application should display a miniature rendition of all active screens, in real time. It generates 60 QImage objects per second, per screen.

Now, these QImages also need to be displayed in a QML widget, as fast and smoothly as possible.

I'm not quite sure what the best approach is here. I can use a Timer and continuously request updates from a QQuickImageProvider to display them as an Image, but this would mean I need to convert each QImage to a QPixmap and I'm afraid that will murder performance.

Is there perhaps a way to feed the QImages to a VideoOutput, via a MediaPlayer or not?

What would be the best approach here?

https://redd.it/185xpop
@qt_reddit

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

Qt - Reddit

Did Qt 6.6.1 broke CMake generators for Visual Studio 16/17 2019/2022?

I just switch my 3rdparty package to from Qt 6.6.0 to 6.6.1 and now I get CMake configuration errors when I call qt_add_translations and use the generator Visual Studio 16 2019 or Visual Studio 17 2022.

CMake Error at C:/TechnoTeam/develop/usr/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:207 (add_custom_command):
TARGET 'update_translations' was not created in this directory.
Call Stack (most recent call first):
C:/TechnoTeam/develop/usr/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:370 (qt6_add_lupdate)
C:/TechnoTeam/develop/usr/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:431 (qt6_add_translations)
CMakeLists.txt:311 (qt_add_translations)
Common/Core/prj/TTImageTestApp/CMakeLists.txt:1 (tt_add_executable)


With Ninja anything works fine. I did not change the CMake version. (3.27.8)

Can anyone reproduce this?

https://redd.it/185uosp
@qt_reddit

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

Qt - Reddit

Traversing Proxy Models to Get to the Source Model at the Bottom
https://www.youtube.com/watch?v=v6clAW6FmcU&feature=youtu.be

https://redd.it/l1xtdn
@qt_reddit

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

Qt - Reddit

Understanding QFileSelector & Devices

Reading the QFileSelector Class documentation, I see:

QFileSelector is a convenience for selecting file variants based on platform or device characteristics


I am successfully using the related QQmlFileSelector class to select a set of files based on if I am building for Mac (a
+mac
directory).

However, I need to also build for Ubuntu Desktop and an embedded device which is also running Ubuntu. Therefore, I cannot just add another platform directory directly related to ubuntu.

Based on the reference to
 characteristics
in the documentation, I figure I can create a folder directly related to the device.

I have a Kit setup for the embedded device and a Device used by the kit named Ansible.

Can anyone provide further details on how I can have QQmlFileSelector select the files in a + folder when building for Ansible?

https://redd.it/l1k10c
@qt_reddit

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

Qt - Reddit

Can't install Qt

I've been trying for the last few days to install Qt. The installer fails at 'Setup-Qt' with the error: Cannot retrieve remote tree.

I also tried downloading the offline installer, but the link on the website is dead. Are they just down for the last day?

https://redd.it/l1cj8n
@qt_reddit

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

Qt - Reddit

[Server outage] Problem with Open-source Downloads
https://www.qt.io/blog/problem-with-open-source-downloads

https://redd.it/l14i8v
@qt_reddit

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

Qt - Reddit

Visualizing the Model Stack in GammaRay
https://www.youtube.com/watch?v=KkJfkrIO29Y&feature=youtu.be

https://redd.it/kzte61
@qt_reddit

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

Qt - Reddit

How do you manage open with yourApp.exe?

YourApp.exe can be opened explicitly or by double-clicking any file (.txt, .xml) of which format is supported by yourApp.exe. This IMO is a common feature, how do you implement it in your MainWindow.

https://redd.it/kygtx8
@qt_reddit

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

Qt - Reddit

QtDay 2020: Conference videos online now
https://www.youtube.com/watch?v=64u0VH08gws&list=PLNDFxsfJ30_VDfUlBnXJ-t_0PljvzOXdl

https://redd.it/kxyjlo
@qt_reddit

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

Qt - Reddit

Qt module-wide includes slow down compilation. Find out more about this common mistake and improve build time
https://www.kdab.com/beware-of-qt-module-wide-includes/

https://redd.it/kwfigd
@qt_reddit

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

Qt - Reddit

Struggling to adjust pop-up windows that are off-screen in Windows Qt Creator.

Hello I'm new to Qt creator. I was trying to change some of the Analyzer settings based on my C++ class's recommendations. I was instructed to go to set up a new custom diagnostic configuration and change the clang warnings (by replacing the -w shown in the attached image with some other text provided by my class instructors) then pressing OK. However, there is no option for me to press OK in the pop up window shown below because it is off screen! Moving my taskbar doesn't help - it's still offscreen. And trying to shrink the window by placing my mouse at the upper left corner and dragging just makes the who window go completely off screen. Any suggestions? I use a Windows 10 and understand this is probably more of a Windows 10 issue but I just wanted to check. Thank you!!

https://preview.redd.it/v67fbv8u1za61.png?width=1738&format=png&auto=webp&s=d516893fed06819f333f8170ad5315d7088a72ec

https://redd.it/kw1mbe
@qt_reddit

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

Qt - Reddit

Can i connect a C# dll methods to my Qt project

Hello everyone I'm a new to Qt and C++ and i want to know is it possible to call a C# dll methods from My Qt project.
I did found out a solution here and the solution was to warp my C# dll methods in a VS C ++ CLR project and then build it and use the C++ project .lib in my Qt project using ' #pragma comment ( "lib file absolute path" lib,) ', is this the right way of doing is there another way like for example
this is my C# dll file

public class Program{
public int sum(int x,int y){
return x+y;
}
}

and in my Qt project would be like this

Program c;
c.sum(2+3);

https://redd.it/kv5oh4
@qt_reddit

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

Qt - Reddit

Missing most of Qt namespace with Netbeans

I'm missing most of Qt (#include <Qt>) including alignments. Does anyone know why? I use Netbeans for Java stuff so I'd prefer to use Netbeans if possible.

https://redd.it/ku8uqg
@qt_reddit

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

Qt - Reddit

item could not be created

&#x200B;

After upgrading to qt creator 12, I turned on qml quick designer, but the window does not appear on the screen as usual. I'd like to fix this problem. If anyone knows please help.

https://redd.it/186hqby
@qt_reddit

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

Qt - Reddit

Qt5 on Apple Arm64 problem when compiling a git repository ...

Hi guys,

I'm trying to build CGRU for Apple Arm64, but I ran into this Qt5 problem.

This is the output of the build.sh:

&#x200B;

>CGRU_VERSION 3.3.1 : '/Users/myuser/cgru'
>
>CGRU_REVISION 38e9deff27b42241dcdae19dd7cc943151477055
>
>Detecting UNIX distribution...
>
>MacOSX 13.3.1 arm64
>
>Building on 'MacOSX'
>
>WARNING! Building without SQL.
>
>Setting c++11 standard for GCC 14.0.3.14030022
>
>Using std::regex ECMAScript regular expressions (Perl-like).
>
>CMake Error at /opt/homebrew/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:14 (message):
>
>The imported target "Qt5::Core" references the file
>
>"/opt/homebrew/.//mkspecs/macx-clang"
>
>but this file does not exist. Possible reasons include:
>
>* The file was deleted, renamed, or moved to another location.
>
>* An install or uninstall procedure did not complete successfully.
>
>* The installation package was faulty and contained
>
>"/opt/homebrew/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
>
>but not all the files it references.
>
>Call Stack (most recent call first):
>
>/opt/homebrew/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:56 (_qt5_Core_check_file_exists)
>
>/opt/homebrew/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:227 (include)
>
>/opt/homebrew/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
>
>libafqt/CMakeLists.txt:7 (find_package)
>
>\-- Configuring incomplete, errors occurred!

&#x200B;

https://redd.it/18697o0
@qt_reddit

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

Qt - Reddit

why i cant write to serial ? | Arduino Uno , QT 5.9.9 , C++

My code can read from arduino uno Fine, but it cannot read from it. I thought about it because I was trying to write while reading data in the same time , so i commented the part that read data, but it still doesn't work. Here is the call for the code

`uno.write_to_arduino("1"); //! testing`

here is the arduino init (it work fine beside the writing part)

#include <QDebug>

#include "arduino.h"

Arduino::Arduino()
{
data = "";
arduino_port_name = "";
arduino_is_available = false;
serial = new QSerialPort;
}

QString Arduino::getarduino_port_name()
{
return arduino_port_name;
}

QSerialPort *Arduino::getserial()
{
return serial;
}

int Arduino::connect_arduino()
{ // recherche du port sur lequel la carte arduino identifée par arduino_uno_vendor_id
// est connectée
foreach (const QSerialPortInfo &serial_port_info, QSerialPortInfo::availablePorts())
{
if (serial_port_info.hasVendorIdentifier() && serial_port_info.hasProductIdentifier())
{
if (serial_port_info.vendorIdentifier() == arduino_uno_vendor_id && serial_port_info.productIdentifier() == arduino_uno_producy_id)
{
arduino_is_available = true;
arduino_port_name = serial_port_info.portName();
}
}
}
qDebug() << "arduino_port_name is :" << arduino_port_name;
if (arduino_is_available)
{ // configuration de la communication ( débit...)
serial->setPortName(arduino_port_name);
if (serial->open(QSerialPort::ReadWrite))
{
serial->setBaudRate(QSerialPort::Baud9600); // débit : 9600 bits/s
serial->setDataBits(QSerialPort::Data8); // Longueur des données : 8 bits,
serial->setParity(QSerialPort::NoParity); // 1 bit de parité optionnel
serial->setStopBits(QSerialPort::OneStop); // Nombre de bits de stop : 1
serial->setFlowControl(QSerialPort::NoFlowControl);
return 0;
}
return 1;
}
return -1;
}

int Arduino::close_arduino()
{
if (serial->isOpen())
{
serial->close();
return 0;
}
return 1;
}

QByteArray Arduino::read_from_arduino()
{
if (serial->isReadable())
{
data = serial->readAll(); // récupérer les données reçues

return data;
}
}

int Arduino::write_to_arduino(QByteArray d)
{
if (serial->isWritable())
{
serial->write(d); // envoyer des donnés vers Arduino
qDebug() << "Data sent to Arduino: " << d;
}
else
{
qDebug() << "Couldn't write to serial!";
}
}


i get `"Couldn't write to serial!"` is there at least a way to debug the issue more ?

https://redd.it/185vqke
@qt_reddit

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

Qt - Reddit

Missing Designer View - Qt Quick Project
https://redd.it/l3qjsd
@qt_reddit

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

Qt - Reddit

Qt6 Apple Silicon Build

Did anybody actually make a build of Qt 6.0 on M1 ? Even a minimal build (only qtbase). I've got a showstopper error about some QTuioTouchPlugin.

https://redd.it/l1itiq
@qt_reddit

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

Qt - Reddit

Does anybody else have this strange bug where the QML ComboBoxes seem to be rotated by 1 degree for no reason? Seems to happen randomly. Any fixes?
https://redd.it/l1fv83
@qt_reddit

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

Qt - Reddit

Getting your 3D ready for Qt 6 - KDAB
https://www.kdab.com/getting-your-3d-ready-for-qt-6/

https://redd.it/l1cci5
@qt_reddit

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

Qt - Reddit

QtSerialPort windows 10

Is QtSerialPort not available in windows online installer repo anymore?

Every time I Install Qt from the online installer, I couldn't find the module and I have to compile it from source :/

https://redd.it/l0aw9l
@qt_reddit

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

Qt - Reddit

Weekly What is everybody working on? Share your progress, discoveries, tips and tricks!



https://redd.it/kzpgn0
@qt_reddit

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

Qt - Reddit

Understanding font sizing across platforms with QML

I have a simple test project at column_layout.

The only file with relevant code is main.qml

I have images for ubuntu and macOS

What I am trying to accomplish is the following:

1. All of the checkmarks should be aligned.
2. The third item (A Little Bit longer) should control the horizontal positioning of the three items. The label and it's checkmark should be horizontally centered in the window.
3. I would like to specify the maximum width of the third item (I know it will be longer then the others) so the font size shrink to fit the width if needed.
4. The three items should be vertically centered in the window.

What I am not sure is possible is specifying things in such a way as to the application figure out the font size and lay everything out accordingly.

What one can see from the two images, the same font information produces much larger text on Ubuntu than on macOS. I would like to be able to specify things so that I do not need to write platform specific code to make sure everything is going to fit and look right across platforms.

How do you handle situations like this? What are some useful tricks you have learned?

What I am wondering is if

Component.onCompleted:
is something I will need to use. Perhaps I could let the component render how it wants, use onCompleted to grab various sizes, assign size values based on what was rendered, and then force it to layout again. If this is the right path, I assume it could be done without an initial draw.

Thoughts? Comments? More information needed?

https://redd.it/ky4r52
@qt_reddit

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

Qt - Reddit

Signal slots over a network

Hello, is there any qt framework, or open source project that implements some form of(not necessarily strictly conforming to Qt's) signal slots over the network using a server/client approach? If not what would something like that be called?

https://redd.it/kwwahp
@qt_reddit

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

Qt - Reddit

Recursely reading a directory to populate a treeList examples?

Hello fellow QTers, wondering if anyone has any examples of reading and populating a treelist recursely in a specified directory? Thanks again.

https://redd.it/kw3023
@qt_reddit

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

Qt - Reddit

QML: Images vs Shapes (Path) vs Shapes (SVG Path) vs Canvas

I'm wondering what people's conventions are for using images, shapes and canvas elements.

Working on a project currently and I've found it useful at least to store my images as SVG as well and at least have these stored in my QML code, whether I use them or not.

Which do you use, why and when? And would you prefer not to use images for things like icons if you can draw them with shapes instead?

Are there any performance considerations for a dev to be aware of when choosing one of the options for their use case?

https://redd.it/kvpzdo
@qt_reddit

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

Qt - Reddit

Weekly What is everybody working on? Share your progress, discoveries, tips and tricks!



https://redd.it/kuxhig
@qt_reddit

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

Qt - Reddit

QT5: stylesheet properties not working only for centralWidget !!

When i try to change background color and image using change the stylesheet option in qt designer using selector. No change is happening :( But, i could make change to all the properties of all the other widgets except this centralWidget. Here is what i wrote.


#centralWidget {
background: rgba(32, 80, 96, 100);
border-image: url(:/images/login_bg.png);
}

this code i have tried pasting under MainWindow as well as under centralWidget
No change!!

Does anyone have a clue?
Thanks!

https://redd.it/ku2e5n
@qt_reddit

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