Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • Emitting signal from another class

    Moved Unsolved
    4
    0 Votes
    4 Posts
    785 Views
    Christian EhrlicherC
    You're aware that the member A aEmit and A o_a are two different instances of the same class? Please go and get a basic c++ book and learn at least the basics of c++ before starting fiddling around with Qt...
  • How to read specific word from a Text file in Qt ?

    Unsolved
    4
    0 Votes
    4 Posts
    617 Views
    Christian EhrlicherC
    @Pappu-Kumar-Keshari said in How to read specific word from a Text file in Qt ?: Please suggest Why should I write code for you? You know when the string contains version so use this string and split it up...
  • Search and select item in QTreeWidget based on Search String

    Solved
    19
    0 Votes
    19 Posts
    7k Views
    O
    @Jmrjj please how can I make a filter to a tree
  • how do I downgrade the SDK version to 10.15 ?

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    C
    The warning is advising that the Qt libraries you are installing have not been tested with the compiler tools (Platform SDK) that the installer can see. This does not automatically mean the libraries will not work. The Platform SDK is the compiler and library suite provided by Apple for your MacOS environment. It's not part of the Qt libraries or the Qt Creator IDE. I am not a Mac pilot but it seems you can have multiple versions installed in parallel (but this would not be the default). See this earlier Qt Forum post on the topic. It link to a Stack Overflow article on how to get older version of the Platform SDK.
  • QGraphicsItem inheritance issues

    Solved qgraphicsitem inheritance
    6
    0 Votes
    6 Posts
    1k Views
    W
    @jsulm Thanks! @JonB I see, thanks for the clarification!
  • Issue using setDragDropMode( QAbstractItemView::InternalMove ) on a QListWidget

    Solved
    3
    0 Votes
    3 Posts
    361 Views
    AndyBriceA
    In the end I went with checking delaying the update until QApplication::mouseButtons() == Qt::NoButton; It's a bit inelegant, but it seems to work.
  • PyQt6 inheritance

    Unsolved
    20
    0 Votes
    20 Posts
    2k Views
    M
    @SGaist @JonB As far as I understand the process with memory, how it will be occupied, when something will be loaded or deleted is not clear. To begin with, I just need to make everything, connect to make it work and then look at the optimization. Thank you both for your advice.
  • Draw vertical text

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    V
    @Christian-Ehrlicher Oh, thank you very very much!!! I'm sorry for wasting time!
  • Directory date time

    Solved
    7
    0 Votes
    7 Posts
    968 Views
    JonBJ
    @Kent-Dorfman Except that the OP did not say they just wanted a command-line way to do it, I thought they meant they wanted to be able to do it in code from a Qt program :)
  • if (my_pointer==nullptr) causes segmentation fault

    Solved
    16
    0 Votes
    16 Posts
    4k Views
    Christian EhrlicherC
    @Chris-Kawa said in if (my_pointer==nullptr) causes segmentation fault: this points to garbage, so this->param is trying to read a value from garbage memory. Reading from garbage memory is access violation and terminates your app. Not that I said it in my first post... :)
  • Q_GLOBAL_STATIC can't find created varibale after placing macro in cpp

    Unsolved
    4
    0 Votes
    4 Posts
    402 Views
    Christian EhrlicherC
    Why do you need a singleton in the first place? There is no need for it at all. And creating a singleton in a cpp file and giving access to them from outside should be that hard for a c programmer...
  • How to prevent application crash

    Unsolved
    5
    0 Votes
    5 Posts
    455 Views
    W
    @Sabrac You fix the bugs that lead to crashes. There's no magic. If there was, you would have heard about it already.
  • QNetworkAccessManager post() not sending body

    Unsolved networkaccessma qt5.6 linux desktop
    5
    0 Votes
    5 Posts
    1k Views
    C
    @JonB It's an internal (private) distro, based on som ancient version of Ubuntu, I guess. Preinstalled on all of thier machines, so I have to stick to that. (Hell they even have Qt4.8 preinstalled sxs!)
  • ":connect' error - "multiple definition..." ?

    Solved
    25
    0 Votes
    25 Posts
    7k Views
    A
    SOLVED Eureka !! The original QT example code has multiple instances of ChatServer and no "delete". Now a minor curiosity question remains: if the test code emits TWO messages , why do I get only ONE "postmessage " ? void BT_ChatServer::PostMessage(const QString) "\n\t TASK Run \nvoid BT_ChatServer::PostMessage(const QString)\n !!!! REMOTE !!!! TEST MESSAGE " void BT_ChatServer::PostMessage(const QString) "\n\t TASK Run \nvoid BT_ChatServer::PostMessage(const QString)\n !!!! REMOTE !!!! TEST MESSAGE " void BT_SPP_CA_MainWindow::PostMessage(const QString) "\n\t TASK Run \nvoid BT_SPP_CA_MainWindow::PostMessage(const QString)\n !!!! REMOTE !!!! TEST MESSAGE "
  • Passing messages between objects - alternative to "connect" ?

    Unsolved
    3
    0 Votes
    3 Posts
    449 Views
    Kent-DorfmanK
    the answer the question based on post title, there are many possibilities to have "objects" communicate with each other but why reinvent the wheel? anything custom will need to be rigorously proven, especially with regard to object syncronization. the signal/slot mechanism already takes care of the heavy lifting. The only time I'd entertain a custom object communications channel would be when IPC (interprocess communications) is necessary, or processes/objects running in their own address space...and then I'd try to choose a high level API that already exists: message queues, fifos, sockets, etc.
  • creating a dummy QAudioDevice

    Unsolved multimedia audio device widget qt6
    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    I would check the internals of the other platform plugins to see how they are used by these classes.
  • QOpenGLWidget not rendring on macos Ventura

    Solved
    4
    0 Votes
    4 Posts
    482 Views
    SGaistS
    To the best of my knowledge, the macOS OpenGL stack was always a bit behind. See this stack overflow answer for a pretty nice breakdown.
  • QT SERIAL PORT THREADING CRASH APP

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    glapalmeG
    Hi, I just stumbled acrros the same issue as yours when switching from Qt5.15.2 MinGW 32-bits to Qt6.3.2 MinGW 64-bits. My application was working fine with Qt5, but was constantly crashing when calling QSerialPort::waitForBytesWritten() when compiling using Qt6. My original code: // My QSerialPort object runs in its own thread QSerialPort *serial = new QSerialPort(this); // initializationn of serial object ... void MySerialClass::write( const QByteArray& bytes ) { serial->write(bytes); if(!serial->waitForBytesWritten()) { qWarning() << "Write timeout!"; } } I found a fix by trial and error: I verify that there is indeed some bytes waiting to be written before calling the function: void MySerialClass::write( const QByteArray& bytes ) { // write() returns the number of bytes that were actually written, or -1 if error quint64 bytes_written = serial->write(bytes); if(bytes_written != bytes.size() && !serial->waitForBytesWritten()) { qWarning() << "Write timeout!"; } } Hope it works for you!
  • Connect QString with byte code

    Solved
    6
    0 Votes
    6 Posts
    752 Views
    hskoglundH
    Thank you for that string breaking trick Chris! It has got me stumped a few times, in HTML it's easy just do a semicolon (Rzesz&oacute;w) but not so in C++ :-)
  • How to observe changes in a list

    Unsolved
    3
    0 Votes
    3 Posts
    343 Views
    LeonaderL
    @jsulm No, it is not a list of MediaObjects, it is a property of MediaObject, which is a list of MeiaOutputs (another class in that namespace). My idea was to subclass MediaObject so I can try to implement this signal into it.