Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Qt 5.12 Unable To Get Touch Events

    Unsolved touch touch screen touchscreen mouse press mousepressevent
    4
    0 Votes
    4 Posts
    1k Views
    Axel SpoerlA
    @Christian-Ehrlicher Done, Sir :-) I was just not sure, whether the fix happened in 5.15 or 6.2. The latter it is.
  • CMake +Qt6 +lupdate

    Solved cmake linguist
    13
    0 Votes
    13 Posts
    4k Views
    ekkescornerE
    @kkoehne said in CMake +Qt6 +lupdate: cool - sounds to become easier and more flexible in 6.7. will test with beta2 And the NATIVE_TS_FILE option only will actually appear in Qt 6.7: https://doc-snapshots.qt.io/qt6-dev/qtlinguist-cmake-qt-add-translations.html I'm developing always in english, where in most cases german is used by customers. Because I'm writing code in 'developer-english' it may happen, that customer requests to change a translation. for these cases and to handle plural forms I always also add an en ts file, so I'm using .ts / _de.ts / _en.ts / _fr.ts ... this is working well because translations not found in _en.ts will come from .ts seems that in this case I don't have to set the NATIVE_TS_FILE, because _en.ts not only contains plural forms ? if setting QT_I18N_LANGUAGES will this work if my (from Qt 5.15 ported) .ts files are in project_dir/translations ? BTW: the lrelease command is executed automatically if building in QtCreator ? In 5.15 my workflow was: lupdate, Linguist, lrelease Now in 6.7 I can do lupdate automatically with add_dependencies(...lupdate) or execute manually with CMD-K cm ...lupdate and lrelease is always done automagically ?
  • How to get Qt Version from builded application?

    Unsolved
    3
    0 Votes
    3 Posts
    384 Views
    W
    @TomNow99 Not sure about Windows, but on Linux it's just: nm myApp | grep Qt_6 > /dev/null echo $? If it prints 0, it's a Qt 6 program, 1 otherwise.
  • Yocto Qt6 run QML app

    Unsolved
    2
    0 Votes
    2 Posts
    375 Views
    K
    @MartinD Did you solve it? I've got the same problem on Rpi CM4...
  • Send attachment by email

    Solved
    27
    0 Votes
    27 Posts
    5k Views
    JonBJ
    @Long-Vu-Ngoc I know, I saw it. Stick to that, you won't get any more help from here.
  • No functional TLS backend was found error

    Unsolved
    2
    1 Votes
    2 Posts
    638 Views
    JonBJ
    @Rozerchik Start by Googling for: qt.network.ssl: No functional TLS backend was found. There are quite a few topics. Have a read, see if any of them apply to your situation?
  • Qt6 QImage never loads image but Qt5 worked

    Solved
    7
    0 Votes
    7 Posts
    519 Views
    Christian EhrlicherC
    @whatabout said in Qt6 QImage never loads image but Qt5 worked: Was this the case with qt5? Maybe, maybe not - it depends on how you installed your Qt. Qt5 was modularized already in the Qt installer but Qt6 gets even more splitted to reduce the installation footprint so yes it might be the case.
  • What percentage of users have Qt6?

    Solved
    15
    0 Votes
    15 Posts
    1k Views
    V
    @whatabout "because what you say is illogical." Well, then don't read the source if you don't believe me. I can just tell you that Liviu do it exactly like I wrote (and like it is also written in the Qt documentaion). When you think it is illogical, then don't do it and code only for Qt5 (or Qt6) - like you want. We code Qt 5 and Qt6 at the same time. It is easy.
  • Pure virtual interface for signal and slots leads to amibigiuos connect method

    Solved
    19
    0 Votes
    19 Posts
    2k Views
    J.HilkJ
    @SiGa you can just use the topic tools and set the whole topic to solved
  • QSerialPort::readyRead couldn't connect to my slot.

    Solved
    4
    0 Votes
    4 Posts
    313 Views
    E
    @jsulm Oh, this is stupid mistake. I'm tired and I can't see anything in front of me. Very grateful to you!
  • Smooth QTableView when periodically adding new data

    Unsolved
    2
    0 Votes
    2 Posts
    315 Views
    M
    @tilz0R Yeah, tableView/treeView are notoriously slow in this area. In a case similar to yours, https://forum.qt.io/post/551198 I used a timer to update the view only a few times per second, not each time some data arrived: // constructeur DumpTreeModel(QTreeView* tree) : TreeItemModel(), _treeView(tree) { connect(this, &QAbstractItemModel::rowsInserted,this, &DumpTreeModel::rowsInserted); /** https://bugreports.qt.io/browse/QTBUG-61763 * QTreeView updates slow down with increasing delay if scrollToBottom is used */ _timer.setInterval(200); _timer.start(); connect(&_timer, &QTimer::timeout, [this] () { static int count=0; int rows=rowCount(QModelIndex()); if(count<rows AND _scrollToBottom) _treeView->scrollToBottom(); count=rows; }); } Don't get me wrong, it doesn't solve the problem, it only postpone it.
  • Embedding PyQt script in c++

    Solved
    14
    0 Votes
    14 Posts
    2k Views
    D
    @jeremy_k Hi again Thanks everyone for helping me. I did manage to make it work by installing pip and setting the correct python executable as a parameter to the QProcess::start() function. My mistake was linking the wrong python (specifically, Microsoft's Python) For anyone wondering here is my working code QProcess process; process.start("C:/Users/boyan/AppData/Local/Programs/Python/Python312/python.exe", QStringList() << "C:/Users/boyan/Desktop/sd.py"); if (!process.waitForFinished()) { qDebug() << "Error: " << process.errorString(); } else { qDebug() << "Process finished successfully."; // Read standard output of the process QByteArray outputData = process.readAllStandardError(); QString outputString = QString::fromUtf8(outputData); qDebug() << "Output:" << outputString; }
  • Tab order

    Unsolved
    5
    0 Votes
    5 Posts
    928 Views
    C
    @JacobNovitsky But how to adjust it using Qt Libs? Either version of QWidget::setTabOrder()
  • Qt Creator rebuilds all headers and cpp files to new objects

    Unsolved
    4
    0 Votes
    4 Posts
    403 Views
    Axel SpoerlA
    @AnneRanch said in Qt Creator rebuilds all headers and cpp files to new objects: this does not help you You asked the very same question in this post. As usual, you got a polite answer. As usual, you did not reply. So we don't know if it was helpful or not. Thanks for calling my answer stupid and not helpful. Made my evening.
  • I can't import .ui file: No module named error

    Unsolved
    5
    0 Votes
    5 Posts
    4k Views
    SGaistS
    @tedburns hi and welcome to devnet, The example in the blog wrote that the Python file should have the same name as the class. This implies that the file shall have a .py extension as rightfully noted by @JonB. In C++, uic will generate the required code if you want to have a full class (you usually want that) and build it. In Python, you have to follow the same logique and generate Python code out of the .ui file if you want to extend the widget with code.
  • QWebChannel.js

    Unsolved
    2
    0 Votes
    2 Posts
    852 Views
    JonBJ
    @Akshaya-Shanker Since this says qrc:... it means the file is embedded into your application executable, so you can't see an external file. I haven't used it, but presumably either you added this file into your project in Creator as a resource, in which case you can see it there, or else why not search the whole of the Qt installation area for a file named qwebchannel.js?
  • QPainter.drawImage in paintGL not work

    Unsolved
    1
    0 Votes
    1 Posts
    164 Views
    No one has replied
  • How can I see the microprocessor register values using Qt?

    Unsolved
    2
    0 Votes
    2 Posts
    320 Views
    jsulmJ
    @grafenocarbono said in How can I see the microprocessor register values using Qt?: Can I introduce assembler functions into the code in Qt Qt has nothing to with this, it's just a C++ framework. You can use inline assembler code in C++ or a stand alone assembler with assembler code files.
  • Using QAxObject and Window Com to Handle Word Stupid Problems

    Unsolved
    2
    0 Votes
    2 Posts
    223 Views
    H
    @hunter-Li QAxBase::setControl: requested control Word.Application could not be instantiated QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed Although I know it's a permission issue, is there a better solution?
  • Memory fault in empty QT Quick application

    Moved Unsolved
    2
    0 Votes
    2 Posts
    262 Views
    Christian EhrlicherC
    These are exceptions so you can catch them. Start your app in a debugger and see where exactly they occur.