Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Installation of libqtGui.so.4

    41
    0 Votes
    41 Posts
    38k Views
    C
    https://download.qt.io/archive/qt/4.8/4.8.7/ You build Qt4 from source because there are no contemporary pre-built packages of Qt4 for ARM. Raspberry Pi's initial machines and Qt5 are roughly aligned in release date (2012). OpenMW have dropped all 32-bit support AFAICT. Oh, and congratulations for resurrection of a 2014 thread.
  • 0 Votes
    2 Posts
    147 Views
    C
    What version of Qt 5 is being used for your run time libraries? What version of Qt 5 is the minimum required for the application? The complaint is about QGradient::~QGradient() which switched from inlined to normal around Qt 5.14
  • 2D Game resolution and sprite question

    Unsolved 2d graphics tiles resolution
    6
    0 Votes
    6 Posts
    606 Views
    jeremy_kJ
    I'm under the impression that supporting multiple resolutions is often accomplished by shipping several sizes of image assets. Unless the target platform is space constrained or the sprite set is large, the cost is trivial. The concept of mipmapping might be of interest.
  • 0 Votes
    4 Posts
    350 Views
    enjoysmathE
    @Christian-Ehrlicher thanks. That worked! Here is a screenshot for future users of where to add it: [image: 88fa498d-56a8-4b71-ad2e-0c3819885997.png]
  • QObject::connect: signal not found in

    Solved
    2
    0 Votes
    2 Posts
    167 Views
    Christian EhrlicherC
    When you're on windows you forgot to export the class.
  • 0 Votes
    2 Posts
    216 Views
    Axel SpoerlA
    The error can have multiple reasons. One is trying to rebuild a broken build tree. Even if it shouldn't happen, changing build options multiple times may cause that (and not be your fault). Mixing release and debug builds in the same directory. rebuilding with a different compiler version Have you tried removing the build directory completely and running cmake again from scratch?
  • Problem reading payload with QUdpSocket

    Unsolved
    9
    0 Votes
    9 Posts
    520 Views
    C
    @Mattia said in Problem reading payload with QUdpSocket: I am not expert of netweorks, so I have no idea if I am receiving in multicast, could you explain me, please? Any IPv4 address 224.0.0.0 to 239.255.255.255 is a multicast address (aka multicast group). Senders are intending that there will be many receivers; any program that joins the multicast group will receive the packets. The address 239.9.66.100 is the address of a multicast group. A host should not have a multicast address assigned to any of it interfaces; it should have a non-multicast address that it uses for traffic. When a host joins the multicast group the upstream switches/routers will conspire to deliver the selected group traffic to the host.
  • When I use a .ui file in a QT Custom Designer Widget project, crashed and exit, why?

    Unsolved
    4
    0 Votes
    4 Posts
    234 Views
    Axel SpoerlA
    Great that you found the solution. Question: How did it happen? Did uic produce broken C++ code? Remark: Please use the </> tags to format your code. Makes it so much easier for others to read.
  • QDirIterator much slower on Qt 6.8.

    Unsolved
    5
    0 Votes
    5 Posts
    389 Views
    Christian EhrlicherC
    See https://bugreports.qt.io/browse/QTBUG-134699
  • QSplitter and resizing of QLabel with video frames does not work properly

    Unsolved
    6
    0 Votes
    6 Posts
    345 Views
    Z
    Hi, Use "QScrollArea" in your "QSplitter" and not "QLabel", then create "QVideoWidget" and use the object as follows: QSplitter *pcoYourSplitter = new QSplitter(Qt::Orientation::Horizontal); pcoYourLayout->addWidget(pcoYourSplitter); QScrollArea *pcoYourScrollArea = new QScrollArea(); QVideoWidget *pcoYourVideoWidget = new QVideoWidget(pcoYourScrollArea); // Add widget or replace widgt - replaceWidget(0, pcoYourVideoWidget) pcoYourSplitter->addWidget(pcoYourVideoWidget); and then start your video. For me, this works fine in C++ and Python (also in C++ MDI area).
  • Calling KAuth action from another action problem.

    Unsolved
    2
    0 Votes
    2 Posts
    154 Views
    S
    Possible Causes: Missing Permissions: The actionName might not have the required permissions for execution. If the action requires elevated privileges (e.g., root permissions), it may fail if the helper is not running with appropriate privileges. Incorrect Helper Setup: The action.setHelperId(actionHelperId) part in both the caller and helper code needs to be aligned properly. If there is a mismatch in the helper ID or incorrect registration of the helper, the action might fail to execute correctly. Failure in the Helper: If the second-level action fails, it can propagate back to the first-level action and cause it to fail with error code 4. Specifically, the error could occur because the second-level action (kcm.policycomplexity.change) failed. Action Parameters: There may be an issue with the arguments being passed to the actions. You are passing an empty map action.setArguments({}), which might not be what the helper expects. Debugging Steps: Check Helper Permissions: Ensure the action test.helper.change and kcm.policycomplexity.change are properly set up in the polkit (PolicyKit) configuration, and that the appropriate permissions are granted for the user executing the application. Ensure Helper Registration: Verify that the helper (test.helper and kcm.policycomplexity) is correctly registered and accessible. In your case, make sure both helpers are properly registered using KAUTH_HELPER_MAIN. Verbose Logging in Helpers: Add more logging in the helpers to make sure that the second-level action (kcm.policycomplexity.change) is executing as expected. cpp Copy Edit KAuth::ActionReply Helper::change(const QVariantMap &args) { qInfo() << "2 lvl action start"; // Log the args to verify if correct arguments are passed qInfo() << "Arguments received:" << args; qInfo() << "2 lvl action end"; return KAuth::ActionReply::SuccessReply(); } Check Polkit Configuration: Ensure that polkit has the correct rules and that the actions are authorized for the user. You might need to modify the /etc/polkit-1/rules.d/ or /usr/share/polkit-1/actions/ files to allow these actions. Return Error Information: If the second-level action fails, ensure it returns a detailed error message using ActionReply::HelperErrorReply(): cpp Copy Edit if (!job->exec()) { qInfo() << "Error in second-level action"; return ActionReply::HelperErrorReply().setErrorDescription("Second-level action failed"); } Improve Error Handling in the Main Action Caller: Make sure you're capturing detailed error information from the first-level action. This can give insights into where the failure occurs: cpp Copy Edit if (!job->exec()) { qInfo() << "Error at 1st level action"; qInfo() << "Error string:" << job->errorString(); qInfo() << "Error description:" << job->errorText(); qInfo() << "Error code:" << job->error(); qInfo() << "Action name:" << job->action().name(); } What to Do Next: Check Polkit Permissions: Ensure the action and helper have the necessary permissions to execute. You can do this by checking the corresponding polkit rule files and ensuring the action is allowed for your user. Verify Arguments: If the helpers expect certain arguments, make sure you're passing them correctly. More Detailed Logging: Add additional logging in both the main action and helper to capture the flow and identify exactly where the failure occurs. Helper Execution: If you are using root privileges, ensure that the helper is properly set up to be executed with elevated privileges. Ensure Proper Action Execution: If the second-level action fails, the error is propagated back to the first-level action. Use ActionReply::HelperErrorReply() in case of errors in the second-level helper and make sure that the first-level action can catch and handle it.
  • the QWebEngineView signal of loadfinished is not very precise

    Unsolved
    4
    0 Votes
    4 Posts
    333 Views
    JonBJ
    @nicker-player I am afraid I used this years ago, I cannot find any source of mine using it and am hazy as to what I did how. For your case, is the page/HTML you are using in your QWebEngineView constructed by your code or is it an external URL? If it's the former, your own, you can put some JS into it to run on "document ready" JS/jQuery. If it's the latter, an external URL, I am not sure when you can use, say, runJavaScript to inject the JS code. Alternatively, I think you are now encouraged to use QWebChannel in QWebEnginePage to communicate "properly" with the JS and hence the DOM model. This did not yet exist when I did work years ago. An example in Python seems to be https://riverbankcomputing.com/pipermail/pyqt/2015-August/036346.html, there may be other/better ones. The important thing is that uses script.setInjectionPoint(QWebEngineScript.DocumentReady) to install the script to run on the page's "document ready". I am afraid I am not going to be able to give any more precise suggestions that the above.
  • 0 Votes
    3 Posts
    175 Views
    SGaistS
    @kuqipair hi, Taking aside the fact that widget items should be used with caution or rather avoided (for performance reason, etc.), why not switch to a secondary empty QListWidget rather than doing all of that ?
  • QProgressDialog does not take input unless the progress value changes

    Unsolved
    14
    1 Votes
    14 Posts
    969 Views
    S
    @JonB, thank you! It does not happen very often, but this I could write on company time. We need the documentation anyways.
  • QToolButton: weird padding behavior compared to QPushButton

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    S
    Well, I face the same problem. Maybe I should subclass the QToolButton.
  • Dialogue vanishes when any button is pressed.

    Solved
    10
    0 Votes
    10 Posts
    453 Views
    Pl45m4P
    @Perdrix said in Dialogue vanishes when any button is pressed.: why would uic put those lines there??? I suspect that Add and Delete button were the buttons that come with a QDialog QtDesigner template... these are connected to the slots by default... to reject and to accept respectively. I think you used these two, renamed and re-designed them while modifying your UI file, while the connection persists. Similar to the "hidden" connect slots by name mechanic, which also might confuse you if one is not aware of that :)
  • How to use .ui file in a QT Custom Designer Widget project?

    Unsolved
    3
    0 Votes
    3 Posts
    183 Views
    Q
    Post content was flagged as spam by Akismet.com why???
  • View model for nested structure with list (QAbstractListModel, QAbstractItemModel)

    Unsolved
    3
    0 Votes
    3 Posts
    255 Views
    S
    Yes, in this case, you need a hierarchical model since a Lesson contains multiple Topics. The QAbstractListModel is not sufficient because it only supports a flat list. Instead, you should use QAbstractItemModel to represent the hierarchical data structure.
  • 0 Votes
    2 Posts
    602 Views
    J
    I've worked around the problem, by directly including the windows headers. Sadly i still have no good explanation for why this wasn't required in 6.5.3, and is required in 6.8.2
  • 0 Votes
    2 Posts
    171 Views
    SGaistS
    Hi and welcome to devnet, Which version of 5.15 are you using ? On which platform ? Based on the comment of the patch, it seems related to High DPI as week which has seen quite a lot of improvement so it might not be possible to backport all of the related work.