Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Q_OBJECT macro not working

    Unsolved qobject vscode cmake
    4
    0 Votes
    4 Posts
    670 Views
    J.HilkJ
    @ugo_ I'm failing to see CMAKE_AUTOMOC in your cmake file, did you forget to enable moc for your project? Nope, I'm just blind :D
  • Error building Qt creator 9.0.1

    Unsolved
    3
    0 Votes
    3 Posts
    223 Views
    K
    @SGaist Can you please be more specific? I downloaded the source code from https://account.qt.io/s/downloads and not from git.
  • How to create rubber band line?

    Unsolved
    5
    0 Votes
    5 Posts
    337 Views
    J
    @jsulm Yes, that's why I tried to create a LineRubberBand class inheriting QRubberBand, which allows me to draw a line instead of the default rect, and it allows dynamical update ( it can draw and erase within mouseMoveEvent, but painter.drawLine() cannot do). Now the line thing created by me and the dynamical update from QRubberBand are combined well, but there are still some problems mentioned above remaind unsolved.
  • Downolad Qt 4.x

    Unsolved
    6
    0 Votes
    6 Posts
    485 Views
    M
    @jsulm Hi, I decided to go back to Ubuntu 20.04 to avoid such problems Miłosz
  • Expandable Text View

    Unsolved
    4
    0 Votes
    4 Posts
    345 Views
    jsulmJ
    @azhagans2 Either add these widgets dynamically when the button is pressed. Or use a https://doc.qt.io/qt-6/qstackedwidget.html to show these widgets when the button is pressed.
  • Cross-Compiling Qt 5.15.8 For Raspberry Pi 64bit Using Docker

    Unsolved
    1
    0 Votes
    1 Posts
    649 Views
    No one has replied
  • 0 Votes
    3 Posts
    218 Views
    Y
    @JoeCFD need to find a old school method, professor doesnt like going new school
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Crypto plugins and windeployqt

    Unsolved
    2
    0 Votes
    2 Posts
    185 Views
    SGaistS
    Hi and welcome to devnet, What was the original question ?
  • Building Qt plugin (TreeView) fails

    Solved
    2
    0 Votes
    2 Posts
    205 Views
    C
    I managed to fix it. Some days ago I replaced my linker (ld) with lld, I restored my old one and now it is working again
  • QT 6.3.1

    Unsolved
    7
    0 Votes
    7 Posts
    471 Views
    SGaistS
    @ukhooder hi and welcome to devnet, Depending on your distribution, it might already provide Qt 6 and the corresponding development packages. Otherwise, you should use the online installer, it will provide with pre-built version of Qt ready to use.
  • unchanged positions of controls in main window

    Unsolved
    11
    0 Votes
    11 Posts
    518 Views
    R
    @Robert-M oldSize.height was -1 at initial call of the method. Problem solved!!!
  • Deploying MySql program

    Unsolved
    2
    0 Votes
    2 Posts
    170 Views
    Christian EhrlicherC
    See https://doc.qt.io/qt-6/sql-driver.html#qmysql "When you distribute your application, remember to include libmysql.dll / libmariadb.dll in your installation package. It must be placed in the same folder as the application executable. libmysql.dll additionally needs the MSVC runtime libraries which can be installed with vcredist.exe"
  • How to automate user tasks in a Desktop app developed in Qt?

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    S
    After countless hours of research and try and error, here is my outcome for those interested into the same topic: Let's first define "automation": Hereby I mean that program code (a script) emulates user actions with the application. The objective is to free the user from repetitive, boring tasks. This could be for example, data exports on a scheduled basis which are then further analyzed. What I am not talking about is: Test automation. automation of industrial processes. With this out of the way, I can summarize: Web applications have an automation API based upon the W3C specification of web driver Windows applications have an automation API called UIA3. It supports Win32, Windows Form, WPF. A Qt application running on Windows cannot benefit from Window's automation API. The underlying libraries of course cannot reference and interact with QML/QQuick objects. If you have a Qt-programmed application that you did not program yourself, there is no way to emulate user interactions! There is no API that allows you to address the GUI elements programmatically. The Accessibility API requires that the developers would have invested their time to provide means to connect with accessibility applications. This is very often not the case for obvious reasons. In the QT world the rule applies : No access to the source code, no way to automate ! Squish and Ranorex are commercial tools made for test automation. In theory they could be converted to emulate user interaction with the 3rd party application. However, for non-commercial automation projects the following reasons speak against this only possible workaround: the considerable license costs of Squish and Ranorex extreme overhead installing these tools necessity to have a separate package for each Qt version, i.e. if you would like to automate an application A coded in qt 6.2 you need to install another package than for a qt application coded in version 6.4. You get it.
  • Building a QInputDialog with only the "ok" button

    Solved
    6
    0 Votes
    6 Posts
    912 Views
    Dummie1138D
    @Pl45m4 Thank you. I presume when you suggested building a custom QDialog class, that involves stuffing a QLineEdit into the QDialog?
  • how to pass the focus to next widget

    Unsolved
    3
    0 Votes
    3 Posts
    406 Views
    E
    @mpergand i got it, ty!
  • 0 Votes
    4 Posts
    411 Views
    JoeCFDJ
    @SteveBuchemy On linux run your code with strace: strace your release app Maybe you can find something. 2 .Run valgrind to check the debug build and maybe you can find something suspicious(for example, uninitialized variables). 3. Check all #if DEBUG block code to see if something is missing for release.
  • Hiding context button in Qt 5.15

    Unsolved
    2
    0 Votes
    2 Posts
    223 Views
    JonBJ
    @Dummie1138 said in Hiding context button in Qt 5.15: Qt::AA_DisableWindowContextHelpButton is to disable it application-wide, to be used on the QApplication object. If you want it only on this dialog try removing Qt::WindowContextHelpButtonHint instead? Something like: passwordBox.setAttribute(Qt::WindowContextHelpButtonHint, false);
  • Change size of qLabel frame when I update the labels text

    Solved
    2
    0 Votes
    2 Posts
    173 Views
    S
    @SOrton Fixed by using setFixedSize()
  • QTabWidget in QScrollArea scroll wheel event issues

    Unsolved
    2
    0 Votes
    2 Posts
    502 Views
    S
    @s0H57 Yep I have the same issue and just posted about it ... https://forum.qt.io/topic/143148/qtabwidget-in-qscroll-area-concurrent-scrolling Maybe a bug ?