Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • How to convert float to Qbytearray in qt

    Solved
    4
    0 Votes
    4 Posts
    399 Views
    JonBJ
    @anil_arise If he uses your QByteArray::number() approach, @stackprogramer should be aware that converts the number to a string representation in the QByteArray. And would need parsing to convert back to a number. Not what I would do for the original question/approach, but up to him.
  • QSqlQuery, stored procedure, lastInsertId

    Unsolved
    3
    0 Votes
    3 Posts
    382 Views
    SPlattenS
    @JonB , thank you, I have since changed the stored procedure to a function that returns the new ID.
  • QML ListView shows only 2 of 3 Elements

    Solved
    4
    0 Votes
    4 Posts
    878 Views
    KroMignonK
    @Detzi I would make some changes in your QML code: for ColumLayout removeLayout.fillWidth: true and Layout.fillHeight: true and add anchors.fill: parent remove implicitHeight, implicitWidth, height and width in the ListView and also add anchors.fill: parent Since "configColumn.childrenRect.height" is a "loop" is there a nice way of getting the resulting height or do i have to explicitly set the switch height and calculatate the resulting height, like "height: fruitModel.count*50" ? In the ListView item, the property contentItem.childrenRect.height should contain the value you want to calculate (cf. .https://doc.qt.io/qt-5/qml-qtquick-item.html#childrenRect.width-prop).
  • how to attach class to qt project without ui file?

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    jsulmJ
    @timob256 said in how to attach class to qt project without ui file?: mainLayout You did not add this layout to any widget or other layout. Don't know how this can work...
  • Qt App startrs but QTableView has no output on remote X11 connection

    Unsolved
    3
    0 Votes
    3 Posts
    241 Views
    P
    Thank you. Same application works on local X server running 4 times at once and it is ok. I will try to reduce display latency X-term and Kate works OK even on remote machine X server
  • Why can't QSettings be written to QTemporaryFile

    Solved
    36
    0 Votes
    36 Posts
    4k Views
    S
    @tovax said in Why can't QSettings be written to QTemporaryFile: I think the tmpFile will be deleted out of the curly braces. That is correct. But, that doesn't matter because if it is gone, it is not opened by someone else anymore. There is nothing stopping you from reusing that exact file name. There is also a member function in QTemporaryFile to keep the file after your temporary file object is gone.
  • call DLL from Qt method C++

    Moved Unsolved
    3
    0 Votes
    3 Posts
    288 Views
    elicatE
    @JonB said in call DLL from Qt method C++: owever to call .NET DLL from C++ Ok I try
  • Additional char in a year button in QCalendarWidget

    Unsolved
    7
    0 Votes
    7 Posts
    447 Views
    eyllanescE
    @qwe3 When I click and the QSpinBox is shown I see "2021"
  • Import Qt dll in C#

    Unsolved
    6
    0 Votes
    6 Posts
    5k Views
    PangolinP
    @mrdebug said in Import Qt dll in C#: DLL This is the right answer.
  • How to get true, accurate DPI values for monitor?

    Unsolved
    3
    0 Votes
    3 Posts
    278 Views
    Kent-DorfmanK
    look in your Xorg.0.log file for the EDID data. As far as consistently getting monitor DPI in all cases...you can't. in many cases its broken by design. https://xorg.freedesktop.narkive.com/UkAoI71R/how-to-read-edid-xrandr
  • Augmented Reality

    Unsolved
    2
    0 Votes
    2 Posts
    206 Views
    AxelViennaA
    You can use any AR library with Qt that produces an output video stream. Here is an example how to stream a video with Qt. I use lullaby from google, which has a fast C++ API for AR.
  • How to detect and enable dark mode?

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    E
    Qt itself does not contain a portal to the existing GTK themes. There are lookalikes like AdwaitaQt, Breeze, and many of Kvantum's themes, but none of them actually get their data from the current GTK theme. This is the closest you will get without doing any work yourself. And it sucks.
  • Prevent multiple TCP segments in post request

    Unsolved
    30
    0 Votes
    30 Posts
    5k Views
    V
    Here is from controller manual: [image: a9a9ff40-3e1d-4ff4-97f1-02de96ccbcc9.png]
  • Cant run Qmediaplayer Error: "Secure connection setup failed."

    Unsolved
    4
    0 Votes
    4 Posts
    348 Views
    SGaistS
    Do you have OpenSSL in your snap package ?
  • Playing RTP stream on Windows with Qt 6.2

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    SGaistS
    Just found out this answer from Lars. Basically full cross-platform support for rtp/rtsp may come after 6.2. One possible alternative is to rebuild QtMultimedia to use GStreamer.
  • Bug when building 6.2

    Unsolved
    2
    0 Votes
    2 Posts
    247 Views
    VRoninV
    @MatrixMagic said in Bug when building 6.2: F:\qt_6\qtbase.\bin\qt_setup_tool_path.bat I think you have an extra . after qtbase that you don't have anywhere else
  • How to add a Backrgound Image on my QMainWindow

    Solved
    8
    0 Votes
    8 Posts
    999 Views
    V
    @Bonnie Alright! When I change my Background Image it works! Thanks for your answers all!
  • Transparency does not work on Qt 5-5.15.2-1

    Solved transparency
    5
    0 Votes
    5 Posts
    4k Views
    A
    @Banjo-0 @LadderOperator I am facing this issue on macOS, on Windows transparency works fine. Are you able to fix the issue.
  • QNetworkReply problem with error

    Unsolved
    11
    0 Votes
    11 Posts
    3k Views
    JonBJ
    @vin212 Well at least this is better! :) Though you still say nothing about where you put this, so it's anyone's guess what still does not work. Qt's network example for "Fortune" are the place to start. I would suggest you look at Fortune Client Example. I would copy that code, or at least the parts of it which deal with setting up the connection and the signals. Get that working first as your "base", and go from there.
  • How to destroy COM object created by QAxObject?

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    M
    @JonB : Yes, it's a mixed app as it relays onto some 3rd party libs that are only available in C#. Not nice, but without alternative for now... @hskoglund : I've been convinced that you were on to something until I learned, that Dispose-Pattern is very useful to free unmanaged resources immediately instead of wating for the garbage collector. But there is no way in C# for an object to destroy itself and free the used memory leaving nothing but a dangling pointer behind... I dug a little deeper into the topic and it seems, that this isn't Qt related. I tried the same, using only standard C++ and the ComBaseApi (combaseapi.h), and got pretty much to the same result. The COM objects reference count actually drops to zero as it is supposed. Here I learned tha when creating a COM object a Runtime Callable Wrapper (RCW) is created to own the object and hold a strong reference to it which could possibly prevent tha GC from doing it's job. I guess I will have a closer look on that...