Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • MySQL driver not loaded in other computers.

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    JonBJ
    @mengsen Of course! Open a Command Prompt. Type: set QT_DEBUG_PLUGINS=1, then <Enter> key. Run the executable (presumably by typing its full path). Look at what you get back in the Command Prompt. Try it first on your system where it works. Then try it where it does not. You are usually interested in the end of the diagnostic output, where it indicates why it could not load MySQL driver. EDIT Ohhh, I have a bad feeling that under Windows someone said the diagnostic output does not go to the terminal where you run from, like it does under Linux, instead it goes somewhere for Windows logging instead :( Yep, see https://www.qtcentre.org/threads/34927-QT_DEBUG__PLUGINS-Windows-7-where-does-it-log-information One post said "Then I use sysinternals debugview free utility to monitor the output at run-time." See post on this forum https://forum.qt.io/topic/41943/platform-plugin-windows/8 Hi, just an update on why QT_DEBUG_PLUGINS=1 doesn't work as expected when you launch a Qt app from the command line (as it does on Linux and Macs): I found that for Windows MSVC and MinGW compilers, Qt routes the texts to OutputDebugString(), that's why the CMD window shows no output. Instead, to see the output, download "Sysinternal's DbgView":http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
  • How to convert float to Qbytearray in qt

    Solved
    4
    0 Votes
    4 Posts
    389 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
    374 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
    865 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
    988 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
    237 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
    286 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
    441 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
    274 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
    200 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
    4k 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
    339 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
    238 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
    978 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.