Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.3k Topics 455.9k Posts
  • Training video or doc on advanced UI building

    Unsolved
    10
    0 Votes
    10 Posts
    579 Views
    V
    Thanks for all the information and feedback. "So you don't want a video on how to work WITH QtCreator? You would like a tutorial on how to create an app like QtCreator yourself?" Yes, exactly, but not it's entire functionality from a product standpoint, just the general UI layout and work flow. Not because I want to create an IDE or a product like Creator, just because I love QT Creator and honestly believe it is a perfect example of a well designed and implement world class desktop application, regardless of whether it is an IDE or a photo editing program. Its general UI design and layout I believe provides a perfect template that could be used as a great starting point for most any application that I would want to create. It utilizes/implements most all the UI functionality I think I would need in most any upcoming projects I have planned, and obviously a tutorial on how to get there quickly would be great. I really enjoy working with QT and learning more about the Framework and how to solve problems with it and will continue doing so. I will press on digging deeper into all the available documentation and example code along with following the various online resources available. Thanks again for all the valuable information and feedback.
  • Issues with QGraphicsPixmapItem handling Mouse Events in QGraphicsScene

    Solved
    5
    0 Votes
    5 Posts
    271 Views
    BondrusiekB
    @JonB I had to reimplement a paint() func. I forgot about using QGraphicsPixmap methods, like using the setPixmap() method is better idea. Now I use QGraphicsObject and reimplement a paint() func.
  • Tiff QImage not working on QT6.7.0 on raspberry

    Solved
    7
    0 Votes
    7 Posts
    406 Views
    C
    Ok, thanks
  • Debugger 8.1 32 bit not working after Update to QT Creator 14.0.0

    Solved
    4
    0 Votes
    4 Posts
    699 Views
    TekenochichiT
    did a copy if the kit and changed the debugger for a higher version. thanks to JonB [image: da701e2e-0c1d-45ca-8008-b3906c0cef02.png]
  • compare Qt's CRC and boost's crc algorithms

    Unsolved
    2
    0 Votes
    2 Posts
    188 Views
    D
    Qt use CRC algo "ISO/IEC 3309" with well-known alias "CRC-16/ISO-HDLC, CRC-16/ISO-IEC-14443-3-B, CRC-16/X-25, CRC-B, X-25", see details. This code to compare Qt's CRC and boost's crc algorithms #include <QCoreApplication> #include <boost/crc.hpp> using namespace boost; typedef crc_optimal<16, 0x1021, 0xffff, 0xffff, true, true> crc_16_X25; QString u16Hex(const quint16 value){ return QString("0x"+QString("%1").arg(value, 4, 16, QChar('0')).toUpper()); } void calc(){ std::array<quint16, 3> arr= {0x0000, 0x0000}; //there is two data elements and third element to keep crc itself crc_16_X25 crc_boost{}; //crc.reset(); //no need because we calc crc first time; use in case of reuse crc_boost.process_block(arr.cbegin(), &arr.at(1)); //calc crc of two elements arr[2]= crc_boost.checksum(); QByteArray b= QByteArray::fromHex("0000"); const quint16 crc_Qt= qChecksum(b); qDebug() << "Qt" << u16Hex(crc_Qt) << "boost" << u16Hex(arr[2]) ; } int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); calc(); QMetaObject::invokeMethod(&a, "quit", Qt::QueuedConnection); return a.exec(); } Output: Qt "0x0F47" boost "0x0F47" See how to build boost library for CRC part here
  • qt version issue/error with version for qgc

    Unsolved
    17
    0 Votes
    17 Posts
    997 Views
    jsulmJ
    @plad said in qt version issue/error with version for qgc: error stating ithat i have to use 2017 visual studio 64 bit That suggests that you installed Qt for MSVC, not MinGW. Fix that first. Or qgroundcontrol does not support MinGW and requires MSVC, in that case use Qt for MSVC.
  • remove any int from a string

    Solved
    14
    0 Votes
    14 Posts
    909 Views
    sierdzioS
    Oh sorry I was looking at some old version of this post :D Forgot to refresh the window, I didn't notice there are other replies already. Yes my code will remove all digits in the entire string.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    16 Views
  • 0 Votes
    15 Posts
    2k Views
    SGaistS
    Right ! Your part was way longer than the original conversation 😅
  • Disabled menu item not greyed out

    Unsolved qmenu
    9
    0 Votes
    9 Posts
    1k Views
    SGaistS
    Thanks for the report. You should add which distribution you are using as well as desktop environment (KDE, Gnome, etc.) and window manager (Xorg, Wayland, etc) and their respective versions.
  • Connect to MySQL database outside LAN Qt C++

    Unsolved
    10
    0 Votes
    10 Posts
    461 Views
    artwawA
    @DiogoIDENG if your company allows site2site tunnelling then you can do with pure AWS and OpenVPN on top. If said company lacks in the devops/sysadmin department look for a paid solution. Either way, you can either do split vpn between a vlan or a dedicated subnet or even a host (or a class of hosts but that's a tad more complex) - that's more safe solution; or something less tailored. Also with OpenVPN you can do per machine/client on-demand service, there is also integration between Google security groups and clients AWS side... Lots of free options, lots of paid ones too. All depends what kind of manpower and resources you have to configure it. Once properly done, however, it is rather maintenance free.
  • Qt Creator 14.0

    Solved
    6
    0 Votes
    6 Posts
    586 Views
    posktomtenP
    Now that I switched from Windows 11 to a cloned copy, it works with Qt Creator 14.0.0. No idea why! Must have done something weird during installation.
  • Kit Selection

    Unsolved
    6
    0 Votes
    6 Posts
    951 Views
    Pl45m4P
    @Davey-Crocket said in Kit Selection: I have the same problem "No suitable Kits found" I'm just trying to create my first project type QT for Python and Qt Quick application I've been searching forums for hours but I'm lost :( See here: https://doc.qt.io/qtcreator/creator-python-development.html
  • Touchscreen "HOLD" (long-press) event gets converted to a right-mouse-button press

    Unsolved
    4
    0 Votes
    4 Posts
    570 Views
    Axel SpoerlA
    If memory serves well, this has been a long standing issue since the old days of Qt 4. The underlying problem is that converting touch events into mouse events is a compromise. Making everything work as expected for all touch screen types is like nailing jelly to a tree :-) I that particular case, nobody ever added reproducing steps to the bug report, so it was closed. I remember to have experienced it in Qt5 (probably 5.15.x), but not in Qt 6. Qt 5.14 is really outdated. The only workaround that comes to mind, is to actually implement touch behavior without relying on mouse event translation. That requires specific implementation for each platform, by using native event filters.
  • QtTreePropertyBrowser / Getting mouse double click

    Unsolved
    7
    0 Votes
    7 Posts
    361 Views
    Pl45m4P
    @excelitas_pco Hi, do you inherit from QtTreePropertyBrowserPrivate directly? Might not be the best idea, since your widget depends on that specific Qt version as the internal Qt code may change just like that. Then your widget does not work anymore. The initial mouse double click hits QTreeView and not the widget I've derived from QtTreePropertyBrowser. Events always start at the innermost child widget at that position and then go bottom-up to the topmost. Probably the QTreeView "eats"/accepts the event, so the propagation ends there. If your code was "inpired" by the Qt source you can fix that, if you inherit the Qt private classes directly, you cannot.
  • How to select an ALPN protocol when using QSslSocket (TLS)

    Solved
    3
    0 Votes
    3 Posts
    241 Views
    Linus JahnL
    Ahhh okay, sorry, yeah I read that as "if you host a server, these are the allowed protocols clients can negotiate with it".
  • QSignalTransition setSignal

    Solved
    2
    0 Votes
    2 Posts
    109 Views
    R
    QByteArray sig = QMetaMethod::fromSignal(&MySender::echoStateChange) .methodSignature() .constData(); transition.data()->setSignal(sig);
  • How to make animated backgrounds?

    Unsolved
    24
    1 Votes
    24 Posts
    3k Views
    artwawA
    @Mizmas please check the release version of your program, the debug ones can be laggy for obvious reasons.
  • How to extract characters from QString...?

    Solved
    12
    1 Votes
    12 Posts
    920 Views
    S
    @JoeCFD said in How to extract characters from QString...?: Is it easier to use std::string to handle it and convert it to QString when needed? I had bad experiences with mixing QString and std::string. There have been times (on Windows with MSVC) where some references to std::string could not be found when using QString::toStdString(). Now, we have set the regular C++ locale to be UTF-8 (which means all std::strings are UTF-8). This also means that we need to use QString::fromUtf8(stdstring.c_str()) and qtstring.toUtf8().data() to convert between QString and std::string. (Under some circumstances the conversion from QString to std::string has some weird behaviour because of calling data() on a temporary object. It would be better to store the result of toUtf8() in a QByteArray before.) So, bad experiences with QString::toStdString/fromStdString() together with UTF-8 std::strings tell me it is not easier to go back and forth between std::string and QString. (Also, QString::mid() might have worse performance than QString::midRef(), but certainly better performance than converting back and forth.)
  • QPushButton default windows style sheet

    Solved qpushbutton sty stylesheet windows
    12
    0 Votes
    12 Posts
    10k Views
    Chris KawaC
    To remove stylesheet style simply set an empty string i.e. someWidget->setStyleSheet("border: 1px solid red; background-color: blue;"); // sets a stylesheet someWidget->setStyleSheet({}); // removes a stylesheet