Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 458.0k Posts
  • Share Files between different Qt Help Project Files

    Unsolved
    2
    0 Votes
    2 Posts
    247 Views
    jeremy_kJ
    The URLs passed to QTextEdit::loadResource() in my project are qthelp://<namespace>/<virtualFolder>/<relative path...>. Based on this, I presume that sharing between namespaces can be accomplished referencing an absolute path including the namespace and virtual folder, or a relative path that ascends the parent hierarchy as appropriate. An alternative is to check for script.js in every request. Edit: QUrl::host() reports the namespace. A relative path using ../ doesn't appear to be an option.
  • Why sometimes the style of a button changes

    Unsolved
    6
    0 Votes
    6 Posts
    543 Views
    C
    @John-Van You are only setting the style sheet set on btn_min but complaining about the changed style of other icons. Perhaps you could post a self-contained, complete example that reproduces the failure. BTW, I'd try removing the half-reference to #btn_max from the style you attached to btn_min.
  • Graphics view

    Solved
    3
    0 Votes
    3 Posts
    311 Views
    W
    @Rockerz As Christian said, it's always a good idea to do basic debugging before you ask other people to take a look. You'll generally get much more useful feedback when you say things like where it's crashing and what sort of crash it is. That said, the QPixmap constructor that takes a const char* doesn't take a filename: https://doc.qt.io/qt-6/qpixmap.html#QPixmap-4 I dunno if that's your issue. But it certainly is one of your issues.
  • WebKit for minGW - how To build?

    Solved
    22
    0 Votes
    22 Posts
    5k Views
    SGaistS
    @8Observer8 Hi, The module has been deprecated and is not supported anymore. You can check this fork of the original reboot project. Its author might be more able to help you.
  • New to Qt and require help

    Unsolved
    5
    0 Votes
    5 Posts
    425 Views
    jsulmJ
    @Nirbhik I don't think there are any QML example apps for serial port communication. There is anyway nothing for serial port in QML. You will have to use the C++ classes (https://doc.qt.io/qt-6/qtserialport-index.html) and use usual communication between C++ ans QML.
  • RemoteObject stops working after wrapping the replicanode

    Solved
    2
    0 Votes
    2 Posts
    209 Views
    Christian EhrlicherC
    @Redman said in RemoteObject stops working after wrapping the replicanode: ROReceiver::ROReceiver(QUrl registryUrl) { m_repNode.setRegistryUrl(registryUrl); QSharedPointer<SimpleSwitchReplica> ptr; ptr.reset( m_repNode.acquire<SimpleSwitchReplica>()); // acquire replica of // source from host node R_SimpleSwitch rSwitch(ptr); } C++ basics - how long does R_SimpleSwitch rSwitch(ptr); live?
  • How to handle a password request when using QProcess for an rsync call?

    Unsolved
    9
    0 Votes
    9 Posts
    881 Views
    JonBJ
    @SimonSchroeder Although possible, I doubt that rsync sends the password prompt to standard output. More likely standard error or directly to controlling terminal. And if you read my post you will see that it is possible/likely that it only prompts if stdin is a terminal. I think you are incorrect about the event loop and the signals when QProcess::waitForFinished() is called. Although I said it might be best not to use this if attaching signals, if you test it I think you will nonetheless find that all the signals work. OP's output already shows all the other signals are being delivered, I think there is nothing to read from rsync. waitForFinished() does not block the event queue, it runs its own loop.
  • add C++ objects in Qt gui

    Moved Unsolved
    3
    0 Votes
    3 Posts
    332 Views
    S
    @Markeggi said in add C++ objects in Qt gui: how can I create a new Widget in the mainwindow.cpp Widgets should have a parent set upon creation (which would most likely be your main window in this case). Adding widgets to layouts also reparents them to the layout's widget. You should be using layouts for everything. One way is to call setCentralWidget() on the main windows to set the widget which is the main part of the main windows. Otherwise set a plain QWidget as the central widget, add a layout to it and then add your widget from the Qt Designer and your own widget to the layout.
  • This topic is deleted!

    Unsolved
    9
    0 Votes
    9 Posts
    644 Views
  • Static linking fails for Qt libs.

    Unsolved
    21
    0 Votes
    21 Posts
    5k Views
    S
    I'm a little late to the party 😉. I have a comment about the original problem that there are some libraries which are dynamically linked. This could be solved for the Qt libs through recompilation (like you are trying), but it doesn't solve it for the other libraries. In any case it is a good idea to create an AppImage that has all the libraries included. In this case you can even include the Qt dynamic libraries into the AppImage. We are using a combination of linuxdeploy and linuxdeployqt to create the AppImage. In the end you have a single file that just looks like an executable to the end user (it is actually an executable which will mount the AppImage and run a specific command after that).
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    26 Views
  • Remove Qt ver

    Unsolved
    2
    0 Votes
    2 Posts
    271 Views
    C
    @JohnLocke A hint about how you have installed these in the first place might be useful.
  • Issue to build release with GStreamer GLVideoItem

    Unsolved
    13
    0 Votes
    13 Posts
    4k Views
    F
    @mipr did you find solution? Release build does not work, development is OK.
  • Unable to link opencv library to QT Creator

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS
    @vibelin hi, Either: Use a MinGW build of OpenCV Use Visual Studio (and a VS Qt build)
  • 0 Votes
    3 Posts
    603 Views
    SGaistS
    Hi, Yes Yes That noted, there might be several ways to do that depending on the model you use. However, the classic way to do that is to use the serial port to exchange data as well as control the device.
  • Qt 6.6.0 Destructor of QList causes a crash.

    Solved
    19
    0 Votes
    19 Posts
    3k Views
    Christian EhrlicherC
    @human99 Ok, thx for the investigation. I'll take a look on it - it should default to debug-and-release to avoid the problems you've encountered.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    19 Views
    No one has replied
  • qt compiling plugin for postgres in static

    Unsolved
    8
    0 Votes
    8 Posts
    630 Views
    Christian EhrlicherC
    I really wonder why there is a documentation when noone is reading it. Static pluigins Q_IMPORT_PLUGINS
  • QGridLayout / QVBoxLayout- have a widget disappear when not enough space?

    Unsolved
    4
    0 Votes
    4 Posts
    341 Views
    N
    @NightShadeI This is the workaround I was able to end up doing class ZeroSpaceGrid : public QGridLayout { public: explicit ZeroSpaceGrid(QWidget* aParent) : QGridLayout{aParent} {} QSize minimumSize() const final { return QSize{0, 0}; } }; I don't like it though. Surely there must be a nicer way to have 2 rows of items, and not have the one with content margins stick around constantly given its min size is non-zero? This feels a hit hacky.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    30 Views
    No one has replied