Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • FastBuild and qmake?

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    S
    The post is already a few years old. However, there does not seem to be any solution. We started using FASTBuild for our qmake-based project. Setting it up for the first time is quite involved. We managed to get it running anyway. I cleaned up our FASTBuild setup for use as a template in other projects and put it on GitHub: https://github.com/SimonSchroeder/QMake2Fastbuild Currently, the setup is for Visual Studio 2013 with WinSDK 8.1 and Qt 5.9.1. It is mostly modular, such that it should be quite easy to adapt it to different versions of VS, WinSDK and Qt. It supports *.ui files, mocables and resources files. Most of the necessary information (files in project, defines, include paths, ...) can be generated through 3 scripts. Only libraries have to be setup by hand in the FASTBuild configuration files. The batch scripts are also easily portable to Linux. For an appropriate setup of compilers you can have look at FASTBuild's own FASTBuild files. I hope this helps anyone. Please let me know if you were able to successfully use the files provided on GitHub. If you add other versions of VS, WinSDK and/or Qt please consider to contribute to the repository.
  • 0 Votes
    6 Posts
    446 Views
    Christian EhrlicherC
    @Sekhar Then please mark the topic as solved, thx
  • Multi Threading in QT

    Unsolved
    3
    0 Votes
    3 Posts
    239 Views
    J.HilkJ
    @SURYA-P you don't Qt Ui component are not allowed to live in different threads.
  • QUDPSocket in bound state

    Unsolved
    2
    0 Votes
    2 Posts
    568 Views
    Christian EhrlicherC
    @supratik123 said in QUDPSocket in bound state: client is returning the number of bytes written even when the server program is not running. Is it something different from Connected state. Since UDP communication is stateless I don't see what should be wrong with this.
  • What does it mean when an entire function is a slot?

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    JKSHJ
    @SGaist said in What does it mean when an entire function is a slot?: Technically speaking, emit is replaced by nothing (take a look at the macro). However, it does make the code more understandable with regard to what should happen at that point. It make also clear that you are calling a signal. +1 In other words... void MyClass::func() { emit mySignal(); // [1] mySignal(); // [2] } ... [1] and [2] are exactly the same from a compiler's point of view. However, [2] is clearer to a human reader.
  • How to use anti-aliasing on QGLWidget?

    Solved opengl qglwidge qopenglwidget antialiasing
    8
    0 Votes
    8 Posts
    5k Views
    Chris KawaC
    @BoboFuego said in How to use anti-aliasing on QGLWidget?: how can I add MyWidget.h as promoted class for it in the MainWindow constructor? Promoted class won't allow you to pass parameters to a constructor. Just don't add it in the designer at all. Lets say you've got this designer_widget as a central widget of the mian window in the designer. Just delete it entirely and add it in code: MainWindow::Mainwindow(QWidget* parent) : QMainWindow(parent) { ui->setupUi(this); MyWidget* gl_widget = new MyWidget(); setCentralWidget(gl_widget); }
  • How to Serialize SQL Result

    Unsolved
    8
    0 Votes
    8 Posts
    3k Views
    M
    @JonB Our problem is similar but not same. In both situation, data is there, inside block. But he tries to cast serialized binary data to a QString, that's why he cannot see the string. He should have used >> operator to create QString from QDataStream. Actually I did like that but somehow QString ate all data inside block. If you check binary representation of block there is 1A before first letter 's'. 1A is aqual to 26 in decimal. My string sample string has 13 characters. 26 shows byte count probably. Actually this is mentioned in Qt 4 serializing page but not in Qt 5 page. https://doc.qt.io/archives/qt-4.8/datastreamformat.html I thought >> operator of QDataStream does this job for us but it seems it doesn't. I need to handle this situation by myself it seems.
  • Grid layout and QGroupBox

    Solved
    6
    0 Votes
    6 Posts
    647 Views
    SGaistS
    If I may, I'd recommend using QFormLayout in place of QGridLayout in this case. That will simplify your life.
  • QDialog/QWidget is closing after init

    Solved
    6
    0 Votes
    6 Posts
    465 Views
    F
    Sorry guys...you two are right... I'm doing this wrong... thanks!
  • QtCreator - compile statistics gone...

    Unsolved qtcreator
    1
    0 Votes
    1 Posts
    235 Views
    No one has replied
  • Qt Debugger stops without breakpoint

    Solved
    3
    0 Votes
    3 Posts
    554 Views
    F
    @JonB I don't know... Today I opened the Qt Creator IDE and it works without this problem...thanks for your help...
  • Logging system in Qt.

    Solved
    4
    0 Votes
    4 Posts
    928 Views
    T
    @bogong I'm in the same boat, which one did you end up using?
  • UDP communication using static library and test program

    Solved
    6
    0 Votes
    6 Posts
    962 Views
    Pablo J. RoginaP
    @supratik123 is your issue solved? if so please mark your post as such!. Thanks.
  • How to insert different arrays into a QVector.

    Solved
    12
    1 Votes
    12 Posts
    3k Views
    JonBJ
    @Shankar-B You raised a dedicated topic https://forum.qt.io/topic/107950/how-to-convert-const-qvector-quint32-to-vector-int for this question. That's where it belongs, not as a post in the topic too.
  • how to write process?

    Solved
    6
    0 Votes
    6 Posts
    591 Views
    JonBJ
    @filipdns OK, and that's good, but for anyone else reading this the point about the file paths means that the "correct"/"at least preferable" way would pass those argument paths as: args<<QDir::toNativeSeparators("C:/Affichage/Display/MessagesToConvert"); args<<QDir::toNativeSeparators("C:/Affichage/Display/MessagesToConvert/"+filename);
  • QByteArray AudioOutput Example

    Unsolved
    2
    0 Votes
    2 Posts
    297 Views
    JonBJ
    @Psnarf Don't understand your question. Assuming you are now compiling 64-bit (right? and that's perhaps unlike in 2012), then sizeof(qint64) == sizeof(int). It will only resize to the value specified, even if the variable could hold a huge number. If the length is only 88K that's what it will resize to, regardless of the type of the variable.
  • Qt signal and slot internal connection details

    Solved
    5
    0 Votes
    5 Posts
    828 Views
    JonBJ
    @Chris-Kawa Yes, but invokeMethod() is on QMetaObject, and that's what I refer to as the "magic" of the old ... (look up a string in a table of functions, rather than using language constructs). You have to pass a test before being allowed to use that, and your programming license will be revoked if you don't know what you are doing and get it wrong... :)
  • 0 Votes
    4 Posts
    300 Views
    JonBJ
    @canid Apart from @Christian-Ehrlicher's observation about tool for detecting memory consumption. I was looking at this recently. What exactly do you mean by "the pointer is deleted"? If you use the usual deleteLater(), memory does not freed until execution returns to the top-level Qt event loop, not before. Or, are you using delete? Even then I wouldn't rely on it being returned to the OS for a one-off. Have you tested this against creating hundreds/thousands of instances of the widget?
  • Crash on language change caused by auto generated code when using a QTableWidget

    Unsolved
    2
    0 Votes
    2 Posts
    383 Views
    mrjjM
    Hi And if you in the process, completely delete ui_QtGuiApplication1.h and rebuild build all ? It sounds like some code left overs. "This is because the code doesn't test if the QTableWidgetItem * " Why would it be NULL ? If you delete from the UI (visually) that code should no longer be there.
  • How to return terminal screen after application quit?

    Locked Unsolved
    2
    0 Votes
    2 Posts
    171 Views
    J.HilkJ
    please do not double post the same question locked as duplicate of https://forum.qt.io/topic/107941/how-to-return-terminal-screen-after-application-quit