Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • 0 Votes
    25 Posts
    10k Views
    B
    @jeremy_k Wow, Awesome ! Thanks for your answer and massive props to @VRonin !
  • How to show/hide a whole docking area?

    5
    1 Votes
    5 Posts
    3k Views
    A
    Thanks @RokeJulianLockhart, but I have (hopefully!) just released the latest version of my Qt application (using Qt 5.12 because I wanted to keep on using QtWebKit, among other things) and I am now using new (more modern, IMO) technologies. I did enjoy my Qt journey though, although not some of the decisions the Qt people made these past few years.
  • QAudioBufferOutput Class - audioBufferReceived (for music visualization)

    Solved
    3
    0 Votes
    3 Posts
    292 Views
    SGaistS
    Hi, An additional suggestion: adopt the new connect style using function address rather than the macro based version. You will have compile time error rather than run-time warnings printed in case of an error.
  • QSpinBoxes take too much vertical space if an application-wide style sheet is set

    Unsolved
    3
    0 Votes
    3 Posts
    333 Views
    l3u_L
    Thanks a lot for the quick follow-up! I'll provide this info in the KDE bug. Hopefully, we'll get that fixed soon …
  • HighGUI

    Unsolved
    3
    0 Votes
    3 Posts
    297 Views
    Pl45m4P
    @PVS71 Either embed the native window as Qt Widget in a container as shown by @jsulm in the linked documentation page OR you can simply create a QImage from cv::Mat and show the image data directly through Qt using a QLabel for example. What is the reason for you to want the OCV Image output window?
  • How can I programmatically translate a QTranslator-translated string back to english?

    Unsolved
    4
    0 Votes
    4 Posts
    353 Views
    JonBJ
    @thierryhenry14 said in How can I programmatically translate a QTranslator-translated string back to english?: Now my problem is that the backend expects the configuration settings to be sent in english. So for example, if there's a config combobox with the choices ["Red", "Blue"], the spanish-translated app would show ["Rojo", "Azul"], but if the user selects the 2nd choice and presses OK, I need to send "choice=Blue" over the network. With the proviso that I have not used QTranslator/tr("..."). This specific case is easy. Every library has a way of setting a combobox/dropdown item to have a display string but also a "value", which (if absent) will default to the display string, but can be set separately. For QComboBox the value is a QVariant and can be set in a variety of ways including addItem(const QString &text, const QVariant &userData = QVariant()) and QComboBox::setItemData(int index, const QVariant &value, int role = Qt::UserRole) and retrieved via QVariant QComboBox::itemData(int index, int role = Qt::UserRole) const, or you can do same via the QAbstractItemModel *QComboBox::model() const. Since you know you always need the English word from a Spanish choice you should store the original English word as the value while allowing the translation for the text. This is what @SGaist was referring to in his reply above.
  • Why does recursion appear in QVector?

    Solved
    3
    0 Votes
    3 Posts
    321 Views
    J.HilkJ
    That's surprising, both should show recursive behaviour. Because you modify the nodes wich would trigger a copy of the vector element. ~ Actually std::vector has no implizit sharing, it does the copy directly. Probably the reason why you see different behaviour.
  • Script engine - porting from Qt5 to Qt6 issues

    Unsolved
    2
    0 Votes
    2 Posts
    300 Views
    J
    Hi Yuri, I'm one of the posters you mentioned above. Sadly the solution I eventually went with was to use quickjs as our javascript engine which gives much more control over the java script environment and allowed me to create/control the plumbing around using c++ types within the javascript environment. Sorry i dont have any other help for you.
  • 0 Votes
    1 Posts
    107 Views
    No one has replied
  • Is there a place to do feature requests?

    Unsolved
    3
    0 Votes
    3 Posts
    334 Views
    M
    @ChrisW67 Thanks
  • QNetworkAccessManager cache

    Unsolved
    3
    0 Votes
    3 Posts
    338 Views
    SGaistS
    @jsulm based on the link, I think this was an answer to an old question.
  • How to handle the OnRowChange EditStrategy in master/detail tables?

    Unsolved
    1
    0 Votes
    1 Posts
    114 Views
    No one has replied
  • QCommandLineParser 'option not expecting values' means?

    Solved
    2
    0 Votes
    2 Posts
    329 Views
    D
    Because of you use not flag (set/unset) but value (like '-n 123'), you should also set valueName... So your code should be QCommandLineOption NumOption(QStringList() << "n" << "num", "help text", "num"); I ask Qt company to make warning message more user-friendly here.
  • how to make the text wrap automatically in the qtablewidgetitem?

    Unsolved
    6
    0 Votes
    6 Posts
    626 Views
    JonBJ
    @nicker-player The hyphen character (-) is often where word breaking occurs in English. On the other hand the underscore character (_) is treated a s part of a "word" and is not where wrapping gets chosen to occur. If QTextOption::WrapAnywhere does not work try WrapAtWordBoundaryOrAnywhere just in case that works better. I don't know what to suggest if none of these work.
  • When using the qxorm plugins to control the qsqldatabase occured the errors.

    Unsolved
    2
    0 Votes
    2 Posts
    253 Views
    JonBJ
    @nicker-player You either have a query still active when you attempt to close the database, or perhaps you have kept a QSqlDatabase instance in existence and then are exiting your program. Check https://doc.qt.io/qt-6/qsqldatabase.html#details Warning: It is highly recommended that you do not keep a copy of the QSqlDatabase around as a member of a class, as this will prevent the instance from being correctly cleaned up on shutdown. If you need to access an existing QSqlDatabase, it should be accessed with database(). If you chose to have a QSqlDatabase member variable, this needs to be deleted before the QCoreApplication instance is deleted, otherwise it may lead to undefined behavior.
  • Cannot determine dependencies of qtposition_nmea.dll

    Unsolved
    16
    0 Votes
    16 Posts
    2k Views
    C
    Feel free to log a bug after searching to see if one already exists.
  • [Solved]My custom widget will not show in Designer

    19
    0 Votes
    19 Posts
    6k Views
    SGaistS
    @WolfgangGriech hi, From memory, the suggestion to have a plug-in and separate library is to keep the dependencies down to a minimum because otherwise you would pull the designer library into your application.
  • QTextureGlyph Runtime Errors

    Solved
    3
    0 Votes
    3 Posts
    281 Views
    M
    Hi @SGaist, Yeah that was a typo. And yes, after moving to v6.8.1, it seems that the problem is gone. Thank you.
  • Need closing element name

    Solved
    3
    0 Votes
    3 Posts
    299 Views
    G
    That is what I thought. Thanks for the confirmation.
  • SDK built with meta-qt6 fails to load QML application in runtime

    Unsolved
    3
    0 Votes
    3 Posts
    363 Views
    R
    Okay thank you. I am now working on Ubuntu 22.04.5 LTS I believe I may have only one problem to solve now. How to influence imageformats path looking for imageformat libraries in the source path. All the other plugins are fixed by QT_QPA_PLATFORM_PLUGIN_PATH=/opt/.../core-64-poky-linux/usr/lib/plugins/platforms qt.core.plugin.factoryloader: checking directory path "/home/.../projects/.../src/ui/imageformats" ...