Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Shared library - parameters as pointers or not?

    Solved
    5
    0 Votes
    5 Posts
    316 Views
    artwawA
    @Christian-Ehrlicher got it, thank you!
  • Converting QByteArray to QString received from HTTPResponse

    Solved
    3
    0 Votes
    3 Posts
    195 Views
    U
    Hi @SGaist . Thanks for the eye opener. Such a silly mistake. I called readAll() twice. 1st for printing and then again for storing into variable. So the second fetch is always empty.
  • MYSQL dll linking issue with QT in windows 10

    Solved
    12
    0 Votes
    12 Posts
    915 Views
    KroMignonK
    @mvsri Just to be sure every dependency is correctly set, can you try to check C:/Qt/Qt5.12.3/5.12.3/mingw73_64/plugins/sqldrivers/qsqlmysqld.dll with Dependency Walker ?
  • QSlider order of change

    Solved
    3
    0 Votes
    3 Posts
    183 Views
    V
    @mrjj Thanks :)
  • Error building sample application Qt 5.14, Visual stuido 2019

    Unsolved
    7
    0 Votes
    7 Posts
    727 Views
    KiraK
    @Christian-Ehrlicher said in Error building sample application Qt 5.14, Visual stuido 2019: here long enough to know what we need. Sorry for that. Here are the details of the implementation: I am using Qt 5.14 and using the msvc-2017 compiler. Below are the snaps of the settings: [image: 75aa6a0b-ab9e-43b1-9e1b-14812f43501d.png] in case of anything else required. [image: 4cda0cbf-0204-460a-8658-4ecf9002e60a.png] General settings: of c/C++ [image: 070bd125-1b53-4fe7-b9e7-a17fb3673ccd.png]
  • Vertical ScrollBar of QTableWidget not moving as expected

    Solved
    15
    0 Votes
    15 Posts
    3k Views
    S
    Hi jsulm, I could finally solve the issue. The problem was in the line ui->tableWidget->setGeometry(-2,40,804,15424); Generally for ui->tableWidget->setGeometry(x,y,width,hight), hight should be equal to number of rows in one page * default vertical section size. Thank You for the hints SGaist, jsulm
  • Load/Render UI inside MainWindow

    Solved
    11
    0 Votes
    11 Posts
    935 Views
    JonBJ
    @fem_dev I'm sorry, I think we struggled to understand what exactly you were asking for here! As @mrjj has said, if you wish to choose between a number of widgets to place in a single area such that at any time only one is present, QStackedWidget is the way to go.
  • linking shared library in static built Qt.

    Unsolved
    16
    0 Votes
    16 Posts
    3k Views
    jsulmJ
    @samdol You need Qt built with same compiler - do not mix binaries built with different C++ compilers.
  • Why graphics scene occupy whole graphics view?

    Unsolved
    5
    0 Votes
    5 Posts
    416 Views
    jsulmJ
    @clostridium_difficile said in Why graphics scene occupy whole graphics view?: how to make scene to get events when mouse pointer is over scene's rendering rectangle? Override https://doc.qt.io/qt-5/qgraphicsscene.html#mouseMoveEvent
  • 0 Votes
    3 Posts
    13k Views
    J
    @roipoussiere said in qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.: qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found. I finally fixed this by deploying the libs needed by wayland-egl plugin: the lib "libQt5WaylandClient.so.5" should be included in the deployed package. which used by the plugin. just FYI.
  • QObject::connect error: function is used but not defined in this translation unit...

    Unsolved
    11
    0 Votes
    11 Posts
    4k Views
    JKSHJ
    @KroMignon said in QObject::connect error: function is used but not defined in this translation unit...: as far as I can see, the connect is not forced as Qt::DirectConnection Qt::DirectConnection is used by default when connecting two objects that live in the same thread: https://doc.qt.io/qt-5/qt.html#ConnectionType-enum my suggestion would be to change the function signature to int and cast the int to your enum inside the function void GraphicsScene::ToolSelected(int activeTool) { ActiveTool at = ActiveTool(activeTool); ... } I would not do this, for many reasons: It breaks type safety as @kshegunov said. In other words, it defeats the whole purpose of enum class which is to improve type safety in enums. It is good practice to avoid C-style casts whenever possible. Let's take extra care to avoid introducing bad practices to new C++ programmers, especially when more robust alternatives exist. There is a solution that does not require breaking type safety, does not require casting, and ultimately cleans up the code: Just remove the namespace as @kshegunov said. It is a good idea to remove the namespace anyway because anonymous namespaces should usually not be used in headers.
  • Hide QGroupBox with QGraphicsOpacityEffect

    Solved
    6
    0 Votes
    6 Posts
    572 Views
    Pl45m4P
    @ivanicy Yes, after rethinking, it makes sense. :-) When you fade-Out your GroupBox and hide it afterwards, the GroupBox is still hidden, when you start the animation. After animation time, you set hidden (false) and the GroupBox just pops up. (because your fade-In animation process is already done)
  • How to make size of upper parts of the Splitter minimum?

    Unsolved
    10
    0 Votes
    10 Posts
    546 Views
    SGaistS
    You should anyway put these each into their own widget. Just to ensure that the splitter is used properly.
  • Qt's QTextEdit has big memory leak problem

    Solved
    19
    0 Votes
    19 Posts
    2k Views
    mrjjM
    Hi When using TextEdit as log viewer , its often a good idea to use setUndoRedoEnabled(false); so it doesn't keep a copy around to be able to undo text changes. Oh. sorry. already mentioned.
  • [Help]QT 5.13.2 for Windows 10 worked troubled with Visual studio 2019

    Solved
    7
    0 Votes
    7 Posts
    761 Views
    SGaistS
    Great ! Glad you found out and thanks for sharing !
  • Suggestion of Software architecture

    Unsolved
    2
    0 Votes
    2 Posts
    181 Views
    SGaistS
    Hi and welcome to devnet, You should start by using a more current version of Qt as well as development system since it seems you are starting a new project. And that for several reasons: Qt 5.8 is outdated and it's not even an LTS release. Support for CAN through the QtSerialBus module The Qt safe renderer Modern tooling Etc.
  • Linking a lib with QT on linux

    Solved
    22
    0 Votes
    22 Posts
    4k Views
    K
    for the header fix, I added in the header and that took care of it #ifdef __cplusplus #define FWCONSOLEAPI_DECLSPEC extern "C" #else #define FWCONSOLEAPI_DECLSPEC extern #endif//__cplusplus thank you again, you guys are awesome
  • Qt and Visual Studio (MSVC) 2019

    Unsolved
    3
    0 Votes
    3 Posts
    350 Views
    K
    @Christian-Ehrlicher Thanks! I will try it, but surely I will be using the command line.
  • attach Qslider to a paint event

    Solved
    7
    0 Votes
    7 Posts
    561 Views
    mrjjM
    @viniltc Hi Well you did good job of following @LeLev advice so it was just a very minor detail but its good to note that when you change member values, you must call update() for it to repaint as it won't detect you change them.
  • Scene3D keyboard input

    Unsolved
    2
    0 Votes
    2 Posts
    382 Views
    T
    Hi, You need to uncomment the line "//focus: true;". Focus is required to get keyboards events in your Scene3D. Regards,