Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • 0 Votes
    1 Posts
    343 Views
    No one has replied
  • 0 Votes
    6 Posts
    998 Views
    jsulmJ
    @CJha The problem is that you can't just replace something in a file if new value has different lenght than the old one. In this case you need to read the file into memory, replace the value and write it back. To read such an ini file and replace something there Qt needs to know how to interpret the data it reads.
  • serial port

    Solved
    10
    0 Votes
    10 Posts
    715 Views
    JonBJ
    @Rockerz In a signal you create for this purpose you should pass as (a) parameter(s) whatever information you want to pass, e.g. a string you want displayed. A slot you write in your existing main window should receive that string and do whatever on the UI side, such as displaying it. You need to understand conceptually why creating a new MainWindow() will never be right and will never address your existing main window instance.
  • Location to download Qt Linguist?

    Unsolved
    7
    0 Votes
    7 Posts
    9k Views
    SGaistS
    In that case, the likely easier path would be to follow the deployment steps for the Linguist you want to share and provide it as an archive (or use the QIF for that)
  • A few questions about pdf file generation using render & QPdfWriter & QCustomplot

    Unsolved
    1
    0 Votes
    1 Posts
    278 Views
    No one has replied
  • how to display / update textEdit ?

    Unsolved
    2
    0 Votes
    2 Posts
    172 Views
    sierdzioS
    @AnneRanch Either start process with a delay QTimer::singleShot(), or through meta object system QMetaObject::invokeMethod(), or move it to another thread, or let the app process events before calling your blocking code: qApp->processEvents(); text = BTUL->ProcessCommand_Raw(" hcitool "," scan " );
  • QObject::connect: Cannot queue arguments of type

    Solved
    27
    0 Votes
    27 Posts
    9k Views
    H
    @micha_eleric Impossible! My demo runs fine and I'm using Qt version 5.6
  • QProcess seems not to work with python calls

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    J
    @JonB , thank you for your interest. I've found an old post where a similar problem to mine was posed (Run python script in Qt). In that case, a user wanted to run Python directly from a QProcess, while I intend to run indirectly (through a batch file). But the problem was exactly the same in both cases, and hence @NotYourFan 's solution has worked for me too. Regards,
  • QCommandLineParser: Can't get command line arguments

    Unsolved
    8
    0 Votes
    8 Posts
    984 Views
    JoeCFDJ
    @ademmler I use "-w width=950" You see the stringlist match.
  • QNetworkInformation on RPI4b causing Segmentation Fault

    Solved
    3
    0 Votes
    3 Posts
    374 Views
    W
    @ChrisW67 Thank you, that fixed it! My bad for missing that. Calling QNetworkInformation::loadDefaultBackend() before calling the features function worked
  • Qt6Gui could not be found

    Solved
    6
    0 Votes
    6 Posts
    4k Views
    mzimmersM
    @Rocky-Plantchair glad to hear it. You might want to mark your topic as solved.
  • QItemDelegate does not save data

    Solved
    7
    0 Votes
    7 Posts
    618 Views
    SGaistS
    I think what you want is Qt::DecorationRole. See here for more information.
  • (QtLocation | QtPositioning | Qt5) Use geodetic system other than wgs84

    Unsolved
    1
    0 Votes
    1 Posts
    137 Views
    No one has replied
  • QTableWidget, emits tableCellChanged

    Unsolved
    3
    0 Votes
    3 Posts
    278 Views
    SPlattenS
    @JonB , it looks like both signals are emitted. I realise it starts with no data, thats why when I set-it up with data I have a call to QSignalBlocker to prevent it emitting signals.
  • Can QCamera be used to control industrial cameras based on GenIcam protocol?

    Solved
    3
    0 Votes
    3 Posts
    347 Views
    Ketan__Patel__0011K
    @mark-waston To use industrial cameras in Qt Application. As per my experience I suggest you should use Your camera SDK, Even i am also using industrial camera Like Baumer, Basler, HikRobot, ImagingSource, Matrix vision, Point Gray(Flir) in my Application. Even industrial Camera SDK provide almost every functionality like Connect Camera, Acquisition Control, Analog Control, etc... And without build own QtMultimedia plugin it''s may be not possible,
  • QWaitCondition and Signals

    Unsolved
    6
    0 Votes
    6 Posts
    949 Views
    S
    @SGaist Hi, this isn't so easy to explain. I can even have several device threads that are to interact with the hardware, whereby only the first thread sends the request to the hardware. The other requests are skipped. The hardware sends the response asynchronously, so I have to wait for it. During this time, the other threads have to wait in the function they are currently in. They cannot leave the scope in between.
  • 0 Votes
    3 Posts
    711 Views
    D
    @sierdzio said in QMouseEvent::pos() returns different values on different OS: No, it is not related to the style selected. I checked on Windows and it has no shift on Windows Vista, Windows and Fusion.
  • Signals and Slots and vtable, oh my!!

    Unsolved
    9
    0 Votes
    9 Posts
    681 Views
    Christian EhrlicherC
    @Pl45m4 You can also moc a .cpp file even though it's unusual. e.g. when you've a small private, object-derived class in your cpp file (as some Qt source code is doing it) instead moving the class definition into an own foo_p.h. I mostly use it for small testcases only containing a main.cpp - then you need to include <main.moc> and cmake is doing the rest (instead fiddling around with a Makefile).
  • How do I declare a custom struct as metatype that is inside an struct?

    Unsolved
    1
    0 Votes
    1 Posts
    106 Views
    No one has replied
  • Declare structs as metatype

    Unsolved
    3
    0 Votes
    3 Posts
    660 Views
    H
    @Damian7546 Did it work? I think the form you write was declaring as Namespace::Struct, not Struct::struct.