Skip to content
  • 143k Topics
    714k Posts
    G

    Above a QListWidget I must display an index number of the item in the list. I am able to accomplish this using

    connect ( ui->aoList, &QListWidget::itemEntered, this, &NotebookView::OnMouse );

    and using the following to display the index:

    void Common::AO_MouseHover ( QListWidgetItem* item ) { // Show the display index m_pGlobal->ao_data.dspIndex->show (); // Get the index of the item selected int32_t row = m_pGlobal->ao_data.list->row ( item ); // Convert the integer to string QString idx = QString::number ( row + 1 ); // Set the index value m_pGlobal->ao_data.dspIndex->setText ( "# " + idx ); }

    This works great but when I am in the QListWidget and not on an item, I need the display index to disappear. I can't use itemEntered because it only triggers when on an item. Any Ideas?

  • Jobs, project showcases, announcements - anything that isn't directly development
    4k Topics
    22k Posts
    Pl45m4P

    @Cantona said in Help sending data from dialog to main window:

    variable username still is not getting any data assigned to it

    Unpleasant answer but no secret or surprise:
    You need to know C++ if you want to get somewhere with Qt :)
    Learn the basics of C++ and OOP and you will understand better and learn faster how to work with Qt.

    @JonB said in Help sending data from dialog to main window:

    // mainwindow cpp file QString username; UsernameDialog *usernameDialog = new UsernameDialog; if (usernameDialog->exec()) username = usernameDialog->username();

    This answer by @JonB is basically everything you need to do to return your variable from your dialog and assign it to something within your QMainWindow class.

  • Everything related to designing and design tools

    116 Topics
    355 Posts
    M

    Finally , I have to use the different mirror that the default as listed in: https://download.qt.io/online/qtsdkrepository/windows_x86/root/qt/Updates.xml.mirrorlist

    after browsing here and there , I must put the mirror without full path to xml. Instead only url before the /online part.

    qt-online-installer-windows-x64-4.8.1.exe --mirror https://qt-mirror.dannhauer.de/

    and voila!
    ef3627c3-b8b8-4c48-8877-9bc1279f7e57-image.png
    b8b101c7-7378-4eb6-a4b9-aaf64c341a0d-image.png

  • Everything related to the QA Tools

    66 Topics
    191 Posts
    H

    You can modify ControlsExt.qml to do this: https://doc.qt.io/squish/how-to-use-the-qml-extension-api.html#qml-extension-api

    Modify the isIgnored function in the qml file.

  • Everything related to learning Qt.

    381 Topics
    2k Posts
    Ash_QtA

    Banner-Academy-Course-Recap-Dec-24-003.png

    Hey Everyone!

    We are now at the end of 2024, and I wanted to take a moment to reflect on the year and what we have accomplished together.

    Qt Academy has grown significantly this year, with new courses from ourselves and others in the Qt Community, such as KDAB and Spyrosoft. We have also updated and improved existing courses, and we are always looking for feedback on how we can improve the content for you.

    Early next year, we will begin wrapping up our beginner QML courses and launch the completed series with a certificate of completion, so stay tuned for that! There will also be a little surprise for those who take the courses as a learning path!

    Big thanks to all who have contributed to Qt Academy by creating content and to those who have taken the courses and provided feedback. We have ambitious plans for 2025, and we hope you will join us on this journey!

    Let's take a look at the courses from December:

    QML Best Practice

    Dive into the essential best practices for writing robust, maintainable, high-performance QML code. This course will equip you with actionable insights and practical examples to elevate your projects and gain a comprehensive understanding of how to write clean, error-resistant QML and leverage advanced language features effectively.

    Qt DataVisualization to Qt Graphs

    Qt Graphs is Qt's newest module, which visualizes data in both 2D and 3D. This course will help you understand the differences between Qt DataVisualization and Qt Graphs, as well as how to migrate your existing code to the new module. Focusing on the practical steps required for migration, we'll guide you through key changes in CMake configurations, code, and asset handling. By the end of this course, you'll have a solid understanding of how to successfully transition your 3D application and leverage the enhanced features of Qt Graphs. It does not cover the 2D offering of Qt Graphs.

    Fundamental Concepts in Qt Design Studio

    Expand your understanding of different properties and familiarize yourself with components and assets. Use the states view in Qt Design Studio to create different states for your components. This tutorial is for people new to Qt Design Studio. To get the most out of the course, we recommend having a basic knowledge of design tools and how they work. You don't need coding experience; however, any knowledge of CSS (Cascading Style Sheets) will help you.

    Project Structure in Qt Design Studio

    Explore Qt Design Studio and develop your understanding of the project structure and the difference between qml and UI files. Learn how to create and manage projects and the difference between declarative and imperative programming by creating a simple project. You don't need coding experience; however, this course is ideal for those with a basic understanding of design tools and how they work.

    Multiple Screens in Qt Design Studio

    Learn how to create multiple screens in Qt Design Studio and navigate between them. You will also explore how to add transitions, animation, and logic to your screens and view the final result in Qt Design Studio.

    We are always looking for feedback on what you would like to see and looking for great people within the community to help us grow.

    If you want to stay in touch, visit the academy homepage and sign up for the newsletter! qt.io/academy. You can also view the whole catalog here.

    ~ Ash

  • 2k Topics
    13k Posts
    JoeCFDJ

    Works. Thank Christian again.

  • 4k Topics
    17k Posts
    R

    请问Qt6.5.3或者更高版本是否已在android上支持usb摄像头?

    我已经尝试使用Qt在android平台上接入usb摄像头很多天了,进展不理想,而且搜不到确切的资料.
    看Qt6.5的描述,说是支持了android的camera2API,但是看了multimedia/camera的例子的代码(又下了Qt6.8.1为了更新的代码),
    其中并没有看到申请具体usb设备权限的内容,使用QMediaDevices::videoInputs()接口在真机上也没有获取到usb摄像头信息.
    而这个摄像头使用其他android程序确实能打开并且获取画面.

    所以希望至少有个明确的答案:是否已支持在android上接入usb摄像头了?
    如果并不支持我就安心去硬啃libuvc了,因为我已经在这个事情上花了太多时间了,而英文论坛里也没什么有用信息.

  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k Topics
    10k Posts
    jsulmJ

    @ellen Not sure what the problem is. The user selects a domain and your app uses that domain to communicate via QNetwork AccessManager.