跳到內容
  • 143k 主題
    718k 貼文
    Z
    All, I'm in the process of converting my desktop application from a local SQL server to a cloud based SQL server in Azure and having some performance issues with the switch. On the local server during testing there are no performance issues. After moving the database to the cloud though I'm noticing a few issues with just the test data (5 tables, each with around 15-25 columns and 30 records in each). Each table is accessed via a custom widget in a QMdiSubWindow. The custom widgets are primarily composed of: QSqlTableModel with an OnManualSubmit edit strategy QTableView (Green) QDataWidgetMapper (Blue) In certain cases, a secondary QTableView lookup based on the primary selection (Red) [image: e0a685c2-94b9-40fb-8f1e-eef45ccd765d.png] From researching similar posts such as this one it appears that my issue is related to the QTableView connections and volume of data() calls on the "live" model when gaining/losing focus, resizing, moving, etc. My questions are: Is this an application design issue? i.e. should the database not be accessed in the cloud? If so, what approaches have others used for database access from multiple locations? If cloud access is fine (albeit with some additional security concerns) how have others implemented a cached model to get around these performance issues as suggested by @SGaist and @MrShawn in the linked post above? My first thought here was to create a QStandardItemModel class that gets populated on initial load via a QSqlQuery with setForwardOnly set to true. Keep track of changes (UPDATE, INSERT, DELETE, etc.) in a cache and batch the uploads to the cloud. Is this on track? My connection is 150 mpbs down/50 mpbs up and I'm running 6.8.1 on Qt Creator 15.0.0. Thanks, Zach
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k 主題
    23k 貼文
    Kent-DorfmanK
    Why is there no forum devoted to discussing state of the forum website itself? I mean I randomly get these unsolicted posts in my forum "inbox" and asbolutely no way that I can see to disable or opt out, and there seems to be no rhyme or reason why they show up. They are obviously NOT administrative in nature. ![alt text][image: 9ee3e17f-b05c-4474-bfa8-c8285b893766.jpg] So I guess that's two issues? no correct subforum, and the reason we should have a correct subforum.
  • Everything related to designing and design tools

    129 391
    129 主題
    391 貼文
    J
    In QT Design Studio, Tab Buttons are mostly for navigation within the UI, but each tab doesn’t automatically hide other content. Usually, a StackView or Loader is needed to switch visible content depending on the active tab.
  • Everything related to the QA Tools

    81 219
    81 主題
    219 貼文
    H
    @IamSumit can you reproduce the issue and share the Support Information logs. Please refer to the following Knowledge Base Article regarding how to obtain the Support Information is https://qatools.knowledgebase.qt.io/misc/collecting-support-info/collecting-support-information-linux-mac-windows/
  • Everything related to learning Qt.

    388 2k
    388 主題
    2k 貼文
    L
    Hello! I have recently systematically studied the content related to QML modular development using CMake under Qt 6.8, and tried to write a set of configurations. To ensure that the project structure is clear, complies with modern CMake specifications, and avoids potential hidden dangers in subsequent maintenance, I hope to invite experienced friends to help review my configuration ideas and implementation details to see if there are any non-standard, optimizable, or missing parts. Project structure: D:\PROJECT\QT\MODERNTEST | CMakeLists.txt | \---src CMakeLists.txt Images.qrc main.cpp Test.qml Global CMakeLists.txt: cmake_minimum_required(VERSION 3.16) project(ModernTest VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTORCC ON) find_package(Qt6 6.8 REQUIRED COMPONENTS Quick) qt_standard_project_setup(REQUIRES 6.8) add_subdirectory(src) Sub CMakeLists.txt: add_executable(${PROJECT_NAME} main.cpp ) qt_add_qml_module(${PROJECT_NAME} URI QMLApp VERSION 0.1 QML_FILES Test.qml RESOURCES Images.qrc ) set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Quick ) install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) main.cpp #include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char* argv[]){ QGuiApplication a(argc,argv); QQmlApplicationEngine engine; engine.loadFromModule("QMLTest","Test"); return a.exec(); } The above is the configuration I organized based on what I learned in class and the official manual. To ensure compliance with modern CMake specifications and avoid potential issues, I sincerely ask all experts to kindly offer their advice and check if there are any omissions or "modern" techniques that can be optimized.
  • 2k 主題
    13k 貼文
    Kent-DorfmanK
    I do a lot of python/pyqt database access using psycopg2 for PostgreSQL. It's so much easier to prototype these kinds of ideas in a language like python, and if needed then port it to c++, but truth be told, most of the time the python app is just works as is so no need to rewrite in c++. For something as simple as you are alluding to, the hard core OO models using DAO/DTO are probably overkill. Also, when dealing qith SQL queries it's "nice" to work in a language that is NOT strongly typed. Sorry if this is a round-about way to respond. Your path has merit in the realm of intellectual curiosity, but if you want it done quickly then python is a better option, and you can still wrap it in a Qt GUI. Yikes! Didn't notice OP was 9 months ago...
  • 4k 主題
    18k 貼文
    L
    我在Qt生成的动态库,是否可以用Visual Studio 中C++直接调用?项目中包含了Qt类型的是否可以生效,比如QString,QTimer? 是否可以用C#调用?
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k 主題
    10k 貼文
    Axel SpoerlA
    Everything looks right in my eyes. If I e.g. search for @Volker-Hilsheimer's blog post about QRangeModel, I'll find it here. Do you have a specific link for me to check?