Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • 1 Votes
    1 Posts
    550 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    10
    0 Votes
    10 Posts
    94 Views
  • how to select the text on double click in qml spin box

    Unsolved qt 5.7 qml spinbox
    2
    0 Votes
    2 Posts
    1k Views
    J.HilkJ
    @vinaygopal you could customise your Spinbox and set your own TextInput, that one still has the selectByMouse, even if 5.15.8 https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-spinbox https://doc.qt.io/qt-5/qml-qtquick-textinput.html#selectByMouse-prop
  • Is Qt still open for business? (and maintenance/support q)

    Unsolved
    11
    0 Votes
    11 Posts
    922 Views
    JKSHJ
    @VHuffaker said in Is Qt still open for business? (and maintenance/support q): @AndyS Sorry, I haven't PM'd anybody here before. I started a chat with you and sent you a message. Let me know if there's some other button I should have pushed. :) The chat provides this forum's PM (private message) functionality, so you're all good
  • Diagnosing problem.

    Solved
    13
    0 Votes
    13 Posts
    992 Views
    J.HilkJ
    @SPlatten great you found the solution nevertheless this cleaning up the code and removing calls to processEvents is never a bad thing to do :D
  • Heavy operations in a second thread

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    goloviznin.kG
    @Christian-Ehrlicher Now (it is Iteration 3 from the 1rst post) a SecondThreadManager which lives while the App lives just directly calls methods on the pointer to the model. I understand it is not right, I want to fix it and I am trying to figure out how to do it in a right and Qt way. When I understand it, I will try to handle OpenGL and other stuff in the second thread.
  • Is it possible to disable shortcuts usage for a widget?

    Solved
    6
    0 Votes
    6 Posts
    629 Views
    JonBJ
    @StarterKit said in Is it possible to disable shortcuts usage for a widget?: Finally I overrode AddTab method to duble & in incoming strings. I did not suggest this because it means you cannot deliberately set any shortcut for any tab item. So long as you are happy with that behaviour then it is OK. @Christian-Ehrlicher's suggestion does not suffer from this issue, since you would only substitute && to &, leaving any deliberate shortcuts in place. As you please.
  • No scrollbars when put QWidget derived class object in QScrollArea

    Solved
    9
    0 Votes
    9 Posts
    722 Views
    S
    @jronald said in No scrollbars when put QWidget derived class object in QScrollArea: I've tried it, resize still doesn't work, and setFixedSize works. Here is what the manual says: If a standard QWidget is used for the child widget, it may be necessary to call QWidget::setMinimumSize() to ensure that the contents of the widget are shown correctly within the scroll area. This means the proper way is to use setMinimumSize() instead of setFixedSize(). However, one of the two is necessary if you use QWidget directly or derive from QWidget without overriding the default behavior.
  • pure QML (or) QML and QtWidget?

    Unsolved
    6
    0 Votes
    6 Posts
    449 Views
    SGaistS
    The image you show does not look like something that requires QtQuick rather some styling. I would recommend taking a look at the QML Book to get some ideas and then decide on the course of actions.
  • How to grab the Framebuffer in QOpenGLWidget class.

    Unsolved
    4
    0 Votes
    4 Posts
    740 Views
    SGaistS
    @BPrasad said in How to grab the Framebuffer in QOpenGLWidget class.: QOpenGLFramebufferObject Are you sure that it is valid ?
  • Keyboard focus after popup Menu

    Unsolved
    2
    0 Votes
    2 Posts
    720 Views
    B
    For the record, I have figured it out. The Window has to be changed to ApplicationWindow, then the popup behaves as expected. The ApplicationWindow's contentItem acts as a FocusScope, so when the popup closes, it goes back to whatever had the focus before. If the action triggered by the menu changes the focus, that's ok too. There is still something weird happening in my application, which was already using ApplicationWindow. For some reason the activeFocus was on the QQuickRootItem, not on the QQuickContentItem. I have added this code and it fixes it: onActiveFocusItemChanged: { if (activeFocusItem === contentItem.parent) contentItem.focus = true }
  • Starting QT app as a Systemd service

    Unsolved
    16
    0 Votes
    16 Posts
    10k Views
    V
    @SGaist @KroMignon Yes, your suggestions helped. Now it works perfectly. Thank you so much for your support!!! I am providing the service files below: xserver.service [Unit] Description=X Server Conflicts=getty@tty1.service plymouth-quit.service After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service [Service] ExecStart=/usr/bin/X ExecStop=/usr/bin/killall -9 X Restart=always IgnoreSIGPIPE=no [Install] Alias=display-manager.service qtapp.service [Unit] Description=QT Application Requires=xserver.service After=xserver.service [Service] Type=simple Environment="DISPLAY=:0" ExecStart=/opt/TestQtApp ExecStop=/bin/bash -c 'pkill TestQtApp' Restart=always IgnoreSIGPIPE=no [Install] WantedBy=multi-user.target
  • Nested QMap with a QHash and fetching values inside the QHash?

    Solved
    4
    0 Votes
    4 Posts
    585 Views
    C
    @SGaist said in Nested QMap with a QHash and fetching values inside the QHash?: Hi, Beside the code, you shall start by doing it in steps: Get the variant from the map Convert the variant to a hash Extract the value you want from the hash Perfect, thanks guys! This worked QMap.first().toHash().value("Mike").toDouble()
  • 0 Votes
    7 Posts
    2k Views
    D
    I finally got it solved... The fix was: QPushButton { width: 100%; } :- )
  • QSystemTrayIcon not showing on certain Linux distros.

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    B
    @Christian-Ehrlicher said in QSystemTrayIcon not showing on certain Linux distros.: You forgot to distribute the ico plugin Correct. Thanks! The directory with the application executable did not have the imageformats/libqico.so plugin shared object file. After adding that, the icon is now nicely shown. The fact that it worked under some circumstances was probably because in those circumstances, the plugin got loaded from our build directory (not from the deployed directory). Setting the QT_DEBUG_PLUGINS environment variable to some non-zero value helped seeing that.
  • Why my programme crashed when I enter from a dialog to a mainwindow

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    W
    @Wgxzzzzzzc Previous error code. int main(int argc, char *argv[]) { QApplication a(argc, argv); Dialog dlg; dlg.show(); return a.exec(); }
  • Use a variable on two sources files

    Unsolved
    3
    0 Votes
    3 Posts
    337 Views
    jsulmJ
    @Benver The question is: how do you use these two classes? Where do you create the instances of these classes? You should avoid static and global variables. Instead your matrices class should have a getter method which returns the extracted number (store that number as member variable): class Matrices { public: double getNumber() { return number; } private: double number; } Other classes then call getNumber() to get that number. Of course the other classes need access to Matrices instance. In Qt you can also use signals/slots to exchange data between classes.
  • How to detect which platform running

    Unsolved
    2
    0 Votes
    2 Posts
    618 Views
    raven-worxR
    @Mikeynl https://doc.qt.io/qt-5/qguiapplication.html#platformName-prop
  • Plugins for PDF to be installed for Qt

    Unsolved
    21
    0 Votes
    21 Posts
    3k Views
    JonBJ
    @harsha123 That's why you needed to check the non-working system's PDF export from within Word before you tried to access it from Qt :)
  • This topic is deleted!

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