Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    4 Votes
    29 Posts
    35k Views
    A
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • Please help,Drag and drop to a QgraphicsView

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QMAKE: Visibility of variables defined in .pro file with SUBDIRS

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • AccessibleName for QPushButton stopped working in the 6.9.2 with the QTabWidget

    Solved
    32
    0 Votes
    32 Posts
    292 Views
    O
    And I fixed it under 6.9.2. The cause is in "app.setStyleSheet(styleSheet); " position in the main.cpp file :). I'm surprised why it worked so long in previous Qt versions :). It was (style issue): app.setStyleSheet(styleSheet); MainWindow win; win.show(); The problem is predictable :( It needs to be: MainWindow win; app.setStyleSheet(styleSheet); win.show(); It's more logical. Firstly create GUI, then apply style :) I think, the problem has resolved.
  • Qt6. Embedding native widgets in QTabWidget/QStackedWidget breaks their geometry

    Unsolved
    3
    0 Votes
    3 Posts
    29 Views
    I
    Addition: you are probably seeing a variation of https://bugreports.qt.io/browse/QTBUG-139132. There is no fix attached to that ticket, possibly something else fixed it "by mistake".
  • Incorrect position of fenestration under Wayland.

    Unsolved
    5
    0 Votes
    5 Posts
    367 Views
    F
    Oh, the second solution does not work. The shell integration could not be loaded, so the qpa plugin wayland could not be loaded, so it uses xcb as a fallback. It worked, so i didn't read the debug carefully, sorry.
  • Detect current CMake configuration type. How?

    Solved
    22
    0 Votes
    22 Posts
    432 Views
    B
    Just look on situation when you developing application that is for Android, Unix, iOS, MacOS from one source. And you application has DIFFERENT sets of files for Debug and Release. ONLY ONE way to use this different sets with XCode - to have debug/release settings in CMake, BEFORE XCode. Using expressions in CMake for definitions sets for XCode is impossible. All things that you've got written is about blocking normal developing for iOS. You require me to develop in separate way for iOS. CMAKE_BUILD_TYPE IS USED FOR CREATING DIFFERENT VERSIONS OF PROJECT AUTOMATICALLY BEFORE XCODE. Think of real world application but not of what XCode using or not. This settings for defining project structure not for XCode. The sets of file require NOT ONLY the CPP sources. It require icons, settings, even different Info.plist files and many other things. How you going to setup this things with #ifndef NDEBUG??? If you going to advise me to use something like this: $<$CONFIG:Debug:${CMAKE_CURRENT_SOURCE_DIR}/dbgsrc.cpp> Try to do it by yourself you will have error from XCode that it's not supported sources that have vary in configurations from expressions. In this case only one way is using CMAKE_BUILD_TYPE to set different type of projects within different sets of files at time of scanning and this scanned project passing to XCode.
  • Genericity, extensibility and reuse: QWidgets Vs QML

    Solved qml c++ qml qwidget performance template
    8
    0 Votes
    8 Posts
    1k Views
    G
    I have picked up QML about three weeks ago and I am liking it very much; I have been implementing some small program with PySide6 and QML and it is a pleasure to program in it, but I do find that I can't find examples; currently, I can't get a TableView to work with the ability to edit values....where can I get some assistance?
  • Issue in qvulkanwindow.cpp ?

    Unsolved
    7
    1 Votes
    7 Posts
    582 Views
    J
    Happens to me for version 6.9.2. Swapchain image count is 3. validation errors are sporadically appearing, would suggest that sometimes timing is just right to divide 3 swapchain images to synchronization with 2 semaphores isnt it also exactly this? https://docs.vulkan.org/guide/latest/swapchain_semaphore_reuse.html
  • Qt 6.10 and text encodings

    Unsolved
    4
    0 Votes
    4 Posts
    55 Views
    AndyBriceA
    @cristian-adam I tried the MinGW_64 version because I don't have Visual Studio 2022 installed. Has anyone got Qt 6.10 and Visual Studio 2020 installed? If so, please run this and let me know that the output is: #include <QCoreApplication> #include <QStringConverter> #include <QtDebug> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); foreach ( const QString& s, QStringConverter::availableCodecs() ) qDebug() << s; return a.exec(); }
  • Whither (many) examples?

    Unsolved
    4
    1 Votes
    4 Posts
    50 Views
    SGaistS
    @FeRDNYC hi, This being a user forum you might not reaching the right people. I would recommend opening a ticket on the bug report system to spark the discussion around the issue of moving the examples.
  • Question about SUBDIRS template in qmake

    Unsolved
    2
    0 Votes
    2 Posts
    26 Views
    SGaistS
    Hi, Subdirs project are full-blown so your original idea won't work. The static libraries is the correct option.
  • Q_INCLUDE_MOC vs Q_DECLARE_OPAQUE_POINTER

    Unsolved
    4
    0 Votes
    4 Posts
    487 Views
    F
    I got into similar situation today, but I had to use Q_MOC_INCLUDE because the class is a Q_OBJECT in my case. The Qt docs suggest that Q_DECLARE_OPAQUE_POINTER is incompatible in this case. Hope this helps!
  • Drag and drop to a QgraphicsView

    Unsolved
    2
    0 Votes
    2 Posts
    20 Views
    JonBJ
    @electric-dev And what happens? Are you going to tell us whether either your dragEnterEvent() or dropEvent() are ever called? Please use the forum's Code tags (``` above & below, or the </> toolbutton) when pasting code especially for Python where indentation matters.
  • vkAcquireNextImageKHR say that Semaphore must not have any pending operations

    Unsolved
    1
    0 Votes
    1 Posts
    21 Views
    No one has replied
  • QPageSetupDialog not displaying, returns error

    Solved
    5
    0 Votes
    5 Posts
    199 Views
    SprezzaturaS
    Also, the "Qt...DLL" files should not be copied to the EXE directory.
  • 0 Votes
    2 Posts
    34 Views
    Pl45m4P
    @vedansh If your account was upgraded to Enterprise you need to downgrade to a free / open source license somehow. Or create a new Qt account. Best is to contact Qt sales directly.
  • How to include files from the subproject dll library in a unit testing subproject

    Unsolved
    3
    0 Votes
    3 Posts
    40 Views
    Pl45m4P
    @Stanislav228 Hi and welcome to the forum, I don't quite understand your issue. You don't need to add the EXPORT to all functions/classes of your library. You can still hide some classes or functions that you don't want in your target that imports the lib. Everything works until I add the q_decl_export directive to the classes in the dll. What should I do? What does not work then?! How do you add the import/export directives to your project? Are you using the "Qt-Global" style?!
  • 0 Votes
    15 Posts
    87 Views
    S
    To add on to this, I discovered why it was trying to insert NULL for relation fields. I did the select before setting my relations. And it wasn't enough to have a separate model load the related table. It has to be loaded in the QSqlRelationTableModel for it to work. So the very original comment here (sorry if this pings you) turned out to be 100% correct. I'm just also posting this here for future reference @JonB said in QSqlRecord forces null in composite primary key on QSqlTableModel::insertRecord: Isn't that actually a consequence of you using a QSqlRelationalTableModel? Isn't it that the Qt side expects to see in the related FoodData table/model an entry for the value of your food column in FoodDay table/model equal to it? You have "broken the contract" you establish with QSqlRelationalTableModel that Qt will see in-memory models maintaining the relationship? It is not good enough if you say the row does exist at the backend database side, if you want to use QSqlRelationalTableModel (you don't have to, it's only for value lookup) you must have the FK model/table up-to-date in memory.
  • How to exclude a specific widget from the global stylesheet?

    Unsolved
    5
    0 Votes
    5 Posts
    87 Views
    S
    You can see if any of the selectors (https://doc.qt.io/qt-6/stylesheet-syntax.html) work for you. You could create your own subclass of QPushButton. As long as all the other buttons are actual QPushButtons the class selector .QPushButton would only style these, but not your subclass. Or you could try to use a Property Selector with your own property. But I'm not sure if that works for buttons that don't have that property. (You see, it is a lot easier to just specify something for a specific button, but a lot harder to specify something for all other buttons.)