Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • This topic is deleted!

    Unsolved
    18
    0 Votes
    18 Posts
    241 Views
  • is there possibility to change interrup hot key to other? ubuntu

    Unsolved
    1
    0 Votes
    1 Posts
    113 Views
    No one has replied
  • Compatibility with the NEWEST protobuf?

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    semlanikS
    The error was fixed here I believe: https://codereview.qt-project.org/c/qt/qtgrpc/+/487341 The error you observe is unrelated to webengine, but it's qtgrpc module that was introduced in Qt6.5. You can skip building it using -skip qtgrpc argument. In our CI we build qtgrpc module against protobuf version 21 by now. The linker error meanwhile looks strange. Did you update the standard library in your system recently? Did you rebuild/reinstall the protobuf in /usr/local/lib? If yes, please submit issue to our bugtracker so we can investigate this issue and provide the respective fix.
  • In gRPC and protobuf modules how to specify the installation path

    Unsolved
    2
    0 Votes
    2 Posts
    906 Views
    semlanikS
    @JohnGa sorry for this delayed response, you can either add: -DProtobuf_ROOT=/path/to/protobuf/install/prefix -DgRPC_ROOT=/path/to/grpc/install/prefix or "-DCMAKE_PREFIX_PATH=/path/to/protobuf/install/prefix;/path/to/grpc/install/prefix" Hope this helps.
  • Function and variable names in macOS Qt release build

    Unsolved
    2
    0 Votes
    2 Posts
    211 Views
    Pl45m4P
    @mjsmithers Hi, there was this topic lately. Have a look here https://forum.qt.io/topic/145863/how-to-protect-my-code-in-qt
  • QFile and binary writing problem

    Moved Unsolved
    14
    0 Votes
    14 Posts
    837 Views
    Kent-DorfmanK
    @qAlexKo said in QFile and binary writing problem: A little unrelated question, if you don't mind: I update an old C text where they used write/read/seek functions with an integer handler (fopen, for instance, does not). I can't find similar functions in QTCreator programming. Do they exist there? The functionality is in QIODevice and its subclass of QFileDevice. Read the docs carefully. QTCreator has nothing to do with the supported API. It is just an IDE.
  • How to pass cmd line arguments to a running instance of mainwindow.

    Solved
    15
    0 Votes
    15 Posts
    1k Views
    ademmlerA
    Hi all, thx to everybody for helping. I mark @SGaist answer as the right one, because he made me investigate again and deeper into QFileOpenEvent. From this nice tutorial - at the very end - I have got the details, which are needed to get QFileOpenEvent work on MacOS: https://youtu.be/o7Z0riL2kgE After overwriting QApplication you can do this in main.cpp #include <mainwindow.h> #include "myapplication.h" int main(int argc, char *argv[]) { MyApplication a(argc, argv); auto arguments = a.arguments(); MainWindow w; w.show(); #ifdef Q_OS_MACOS QObject::connect(&a, &MyApplication::openFile, &w, &MainWindow::messageSend); #else w.messageSend(arguments.at(1)); #endif return a.exec(); }
  • SQL Plugin with CMake example. Is there any?

    Unsolved
    3
    0 Votes
    3 Posts
    294 Views
    Christian EhrlicherC
    @bogong said in SQL Plugin with CMake example. Is there any?: Don't know how to develop CMake file itself for this case. Simply look at the sql plugins provided by Qt should more or less be enough I would guess.
  • KDE application themes not available in Qt5

    Unsolved
    2
    0 Votes
    2 Posts
    274 Views
    SGaistS
    Hi and welcome to devnet, The most simple in this case is to use your distribution provided Qt.
  • How to reply to an emitter dynamicaly

    Unsolved
    3
    0 Votes
    3 Posts
    241 Views
    Pl45m4P
    @Azerty said in How to reply to an emitter dynamicaly: I would like to know if inside a slot (the receiver) I can connect a signal to it in order to reply to it and then disconnect the signal after it has been emitted in order to manage an other client? This sounds like weird design. Are you doing some server - client connection? Anyway, there is QObject::sender() which can be used inside slots to get the signal emitting QObject https://doc.qt.io//qt-6/qobject.html#sender
  • QT Design Full Screen

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    beautifulcloudB
    @Pl45m4 Thanks for your help both, Here is what I did : [image: 8a84d352-68a6-4d85-9f27-5a7dde88a09a.png] [image: dc073197-5d83-4830-b117-270d7c1b28f3.png]
  • Using Npcap with Qt Creator 6.4.3

    Solved
    7
    0 Votes
    7 Posts
    695 Views
    _
    @JonB You are right , so I have linked it against the x64 bit and it works now , Thank you.
  • Add a GIF when gui is loading.

    Unsolved
    4
    0 Votes
    4 Posts
    370 Views
    M
    @Pariposh said in Add a GIF when gui is loading.: @JonB yes i have but i want to use QMovie for playing my animated GIF QLabel can do that: void QLabel::setMovie(QMovie *movie) Sets the label contents to movie. Any previous content is cleared. The label does NOT take ownership of the movie. The buddy shortcut, if any, is disabled. See also movie() and setBuddy().
  • ChartView is too slow

    Solved
    4
    0 Votes
    4 Posts
    930 Views
    Atr0p0sA
    @aka123 No, I didn't. ChartView adds points one by one quickly enough, as long as there is no need to add a large number of points at the same time. But in this case, LineSeries's replace() method solves the problem.
  • What's the current way to handle linking Qt as a dll to my native C++ app?

    Unsolved
    6
    0 Votes
    6 Posts
    741 Views
    jeremy_kJ
    @SimonSchroeder said in What's the current way to handle linking Qt as a dll to my native C++ app?: Good catch. Furthermore, there should be no space after -L. Separating -L and the link path seems to be fine. I don't see it mentioned explicitly in the documentation like the two variations of -l, but it has worked for a significant length of time. That may be a general allowance for -<option><value> arguments. It can even be necessary if relying on a shell to convert ~ to $HOME. ie: g++ -L ~/Qt/5.15.2/gcc_64/lib -l Qt5Core a.cpp works. g++ -L~/Qt/5.15.2/gcc_64/lib -l Qt5Core a.cpp does not.
  • This topic is deleted!

    Solved
    9
    0 Votes
    9 Posts
    62 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Truncated labels in Y-axis of QChartView

    Unsolved qtcharts qchartview qvalueaxis
    4
    1 Votes
    4 Posts
    4k Views
    AlexB89A
    I'm not sure how this happened to the previous two question askers, but for me the solution was quite simple. Qt works just fine at displaying the plot axis data so long as you: Have enough space to do so Don't mess with the default settings In my case, I had the axis tick count set pretty high which was causing the labels to squish together. If you leave the tick counts at their default, or let Qt decide, it should work just fine.
  • Gantt Chart Not Updating

    Solved
    3
    0 Votes
    3 Posts
    387 Views
    M
    I see that you're experiencing an issue with updating your Gantt chart even though your QStandardItemModel isn't empty. One possibility is that your view is not being updated even after the model data changes. From the provided code, it looks like the data received in ScheduleAdvice::dataTransferSlot(QJsonDocument doc) is processed and used to modify mTxArray and mRxArray. However, the Gantt chart view update is not explicitly triggered after these modifications. Another possible issue could be the signal/slot connection between the ScheduleInput and ScheduleAdvice instances. Since ScheduleInput is created within the ScheduleAdvice constructor, you must ensure that it emits the transferDataSignal(QJsonDocument) after it's connected to the ScheduleAdvice::dataTransferSlot(QJsonDocument doc) slot. Finally, ensure that mTxArray and mRxArray are indeed modifying the Gantt Chart's model data. It isn't very clear from the code you've shared how the changes to these arrays influence the data displayed on the Gantt Chart. To help with debugging, consider adding debug output at various points in your program to confirm the signals are emitted and slots are triggered as expected, and the data in your model is correct.
  • Correct code to display available languages

    Unsolved
    3
    0 Votes
    3 Posts
    353 Views
    PerdrixP
    @Christian-Ehrlicher Blush!!!! The following works a LOT better! QDir dir(":/i18n/", "DSS_*.qm"); for(auto it: dir.entryList()) { QString lang = it.section('_', 1); lang = lang.section('.', 0, 0); QString langName = QLocale(lang).nativeLanguageName(); if ("en" == lang) langName = "English"; ui->comboBox->addItem(langName, lang); } [image: b13287c7-0bba-48a8-82b1-1219b89abc1e.png]