Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Need lock for model and view?

    Unsolved
    3
    0 Votes
    3 Posts
    276 Views
    jronaldJ
    @VRonin said in Need lock for model and view?: Are you using multiple threads? Maybe. Posting event to the UI thread seems a good solution.
  • Clear QLineEdit on Click

    Solved
    8
    0 Votes
    8 Posts
    4k Views
    S
    @aha_1980 said in Clear QLineEdit on Click: Hi @Shoaib-Muhammad, one thing to note is, that QLineEdit already has a clearButton. But I'm not sure how much that will help you, as the default implementation clears everything. But probably you can detect that and print your prefix again. Regards Hi aha_1980, Thank you for this. This works as an alternative. I have read this function somewhere and completely forgot about it. Thank you everyone for your inputs. I'll mark this thread solved. Kind regards, Shoaib
  • Create a Windows system message/notification

    Unsolved
    5
    0 Votes
    5 Posts
    4k Views
    mrjjM
    Hi There is also https://github.com/mohabouje/WinToast
  • How to put many controls in a window with scrollbars?

    Solved
    4
    0 Votes
    4 Posts
    345 Views
    mrjjM
    @JonB Only when they are used with setIndexWidget() ;) In this case its more due to the fact that a QScrollArea with "hundres of buttons" gets slow pretty fast on non Desktop class devices. So View + Delegate is the sure road to better performance and in many cases the preferred way which you likely already know. :)
  • 0 Votes
    2 Posts
    454 Views
    G
    just use #qmake -t vclib QGLViewer.pro -spec win32-msvc
  • How to write code to get the name/current text of a menu item?

    Locked Unsolved
    2
    0 Votes
    2 Posts
    178 Views
    aha_1980A
    @sdf1444 no cross posts please. closing this one in favor of https://forum.qt.io/post/560025 Thanks
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • error: no member named 'addWidget' in 'QFrame'

    Unsolved
    23
    0 Votes
    23 Posts
    5k Views
    mrjjM
    @lse123 Hi But installing the newest version gives the same as Updating to the newest version. Anyway as @jsulm says [image: VQgTQ5.png]
  • open dialog in friend class

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    JonBJ
    @hobbyProgrammer Yes, I meant to write, multiple-inheritance can be a bit tricky if you're not used to it. You have to explicitly indicate which class's method you are trying to override/invoke if there is ambiguity. You can Google for helper class C++ for examples. For a start any methods in your current derivation which do not use this (for the QGraphicsView), or can be re-factored not to use it, are candidates for moving out. Related is also encapsulation, where you define a class which does not derive from QGraphicsView but instead has the QGraphicsView as a member, and operates on that as needed. It's a fine line to decide when best to use what in your design, but that's programming for you :)
  • QtTest Test Multiple Classes

    Solved
    5
    0 Votes
    5 Posts
    4k Views
    VRoninV
    This also breaks test output to file (xml/xunit/csv). It's just cleaner and better to create a separate project for each test with an individual main if you want to use the Qt Test framework
  • Integrating own accessibility back-end into Qt5

    Unsolved
    1
    0 Votes
    1 Posts
    165 Views
    No one has replied
  • Qt Install Framework - Uninstall silently

    Unsolved
    1
    0 Votes
    1 Posts
    226 Views
    No one has replied
  • How to change QComboBox highlighted item when a particular signal is emitted

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    Q
    @VRonin Thank you for your help! This works!
  • Multiple inheritance and signals/slots

    Solved
    13
    0 Votes
    13 Posts
    1k Views
    AndyBriceA
    It turns out that I was later calling QObject::disconnect() on IntParameterWidget, which also disconnected signals in the base classes, including the QComboBox valueChanged( int ) signal. So it isn't a Qt bug/issue. Just my stupidity. Oops.
  • This topic is deleted!

    Unsolved
    1
    -1 Votes
    1 Posts
    6 Views
    No one has replied
  • QAudioOutput in pull mode

    Unsolved
    3
    0 Votes
    3 Posts
    466 Views
    A
    Using the 2nd thread is a good suggestion, but the documentation does not say anything about this being valid or not and all the question I saw about this went unanswered the difference between push and pull is not explained very well I believe. I read the code for the pulseaudio case and I have understood that the only difference is who owns the timer. In pull mode, the AudioOutput owns the timer and will call you to get the data. In push mode your application will require a timer (if one is not already present) and will do exactly the same, ie write the data.
  • Dynamc Call for QMetaObject::invokeMethod

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    T
    @J-Hilk wow thank you it works fine :)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Set connection name for QSqlDatabase. How?

    Solved
    5
    0 Votes
    5 Posts
    707 Views
    Christian EhrlicherC
    See QSqlDatabase::addDatabase() and QSqlDatabase::database()
  • QUrl encoding

    Solved
    3
    0 Votes
    3 Posts
    274 Views
    D
    The problem was that CURL automatically removes the '{' escape character from the url. With CURL, the server does not see this escape character whereas with Qt it was transformed into '%7B'. The server did not see the same requests. Thanks for your help. Regards. D/