Skip to content
  • 0 Votes
    4 Posts
    1k Views
    RokeJulianLockhartR
    @stevej, see post/529035: On Windows and macOS, the native print dialog is used, which means that some QWidget and QDialog properties set on the dialog won't be respected. I can confirm on Linux that it utilises its own modal. I don't believe that a portal exists for this yet.
  • 0 Votes
    5 Posts
    241 Views
    Pl45m4P
    @johnzhou721 said in How Should One Register Standard QActions in the Menu Bar to Perform the Appropriate Action?: are those edit actions usually not present if there’s multiple line edits then? The shortcut is pretty much the same as pressing Ctrl + X. What else do you want to "cut"? If there is nothing to which you can apply "cut", nothing happens. Same as if you just press Ctrl + X without selecting some file/text.
  • Should I enable lldb debug scripts?

    Moved Unsolved Qt Creator and other tools
    1
    0 Votes
    1 Posts
    24 Views
    No one has replied
  • Qt don't see QtQuick library?

    Unsolved QML and Qt Quick
    1
    0 Votes
    1 Posts
    18 Views
    No one has replied
  • QT for Qnx Project Configuration / Kit Error

    Unsolved Mobile and Embedded
    7
    0 Votes
    7 Posts
    115 Views
    jsulmJ
    @zvoopz said in QT for Qnx Project Configuration / Kit Error: Look at the sreenshots he has provided - qmake This is how you add a Qt version in QtCreator - by pointing to qmake
  • Include large resources using Visual Studio?

    Unsolved General and Desktop
    3
    0 Votes
    3 Posts
    89 Views
    T
    @Christian-Ehrlicher QT VS Tools is automatically including .qrc files, so I'm not using qt_add_resources. Also, I'm not using CMAKE.
  • 0 Votes
    7 Posts
    156 Views
    V
    Thank you! I did not see your comment and tried with QQuickItem, it also worked! [image: 1a35fd2d-bfa9-4a61-b1d1-4931fcd7b1f4.png]
  • pyqt5,Curve rendering error

    Solved Qt for Python
    3
    0 Votes
    3 Posts
    56 Views
    Q
    @SGaist said in pyqt5,Curve rendering error: Hi and welcome to devnet, Without any code to reproduce that, there's only a very slight chance someone can guess what might be going on. Please provide a minimal script that shows this issue. Thanks, I have found the solution:When using a new brush, the program needs to set setBrush(Qt.NoBrush)
  • 0 Votes
    2 Posts
    50 Views
    SGaistS
    Hi and welcome to devnet, Are you working within a conda environment and Qt 5 comes from the online installer ?
  • 0 Votes
    5 Posts
    369 Views
    A
    I've encountered the same. But this time on iOS, whereby the stateChanged signal stays stuck in ConnectedState, even if the central device disconnects.
  • Resizing controls in SplitView

    Solved QML and Qt Quick
    6
    0 Votes
    6 Posts
    116 Views
    T
    Yes, @GrecKo is right about the anchor, and the information about the SplitView.minimumWidth is misleading. Sorry about that.
  • Test Case failed

    Unsolved Installation and Deployment
    9
    0 Votes
    9 Posts
    275 Views
    Christian EhrlicherC
    I just repeat myself: "24.04 is currently not tested in the ci due to too much failures." - and your output just shows some of them...
  • Don't play mp3

    Solved General and Desktop
    12
    0 Votes
    12 Posts
    273 Views
    M
    it's work with vlc #pragma once #include <QObject> #include <vlc/vlc.h> #include <QString> #include <QUrl> #include <QTimer> class VlcAudioPlayer : public QObject { Q_OBJECT public: explicit VlcAudioPlayer(QObject* parent = nullptr); ~VlcAudioPlayer(); // Запустить воспроизведение аудиофайла по локальному пути bool play(const QString& filePath); // Остановить воспроизведение void stop(); // Проверить, играет ли сейчас аудио bool isPlaying() const; signals: void started(); void stopped(); void finished(); private slots: void checkPlayback(); private: libvlc_instance_t* m_instance = nullptr; libvlc_media_player_t* m_mediaPlayer = nullptr; QTimer m_timer; }; #include "VlcAudioPlayer.h" #include <QDebug> VlcAudioPlayer::VlcAudioPlayer(QObject* parent) : QObject(parent) { const char* args[] = { "--no-xlib" }; m_instance = libvlc_new(1, args); if (!m_instance) { qWarning() << "Failed to create libVLC instance"; } m_mediaPlayer = nullptr; // Таймер для проверки состояния воспроизведения connect(&m_timer, &QTimer::timeout, this, &VlcAudioPlayer::checkPlayback); m_timer.setInterval(200); // проверять каждые 200 мс } VlcAudioPlayer::~VlcAudioPlayer() { if (m_mediaPlayer) { libvlc_media_player_stop(m_mediaPlayer); libvlc_media_player_release(m_mediaPlayer); } if (m_instance) { libvlc_release(m_instance); } } bool VlcAudioPlayer::play(const QString& filePath) { if (!m_instance) { qWarning() << "libVLC instance is null"; return false; } // Если уже играет, остановим if (isPlaying()) { stop(); } // Преобразуем путь в URI QUrl url = QUrl::fromLocalFile(filePath); QString uri = url.toString(); libvlc_media_t* media = libvlc_media_new_location(m_instance, uri.toUtf8().constData()); if (!media) { qWarning() << "Failed to create media from URI:" << uri; return false; } if (m_mediaPlayer) { libvlc_media_player_stop(m_mediaPlayer); libvlc_media_player_release(m_mediaPlayer); m_mediaPlayer = nullptr; } m_mediaPlayer = libvlc_media_player_new_from_media(media); libvlc_media_release(media); if (!m_mediaPlayer) { qWarning() << "Failed to create media player"; return false; } if (libvlc_media_player_play(m_mediaPlayer) != 0) { qWarning() << "Failed to start playback"; libvlc_media_player_release(m_mediaPlayer); m_mediaPlayer = nullptr; return false; } emit started(); m_timer.start(); return true; } void VlcAudioPlayer::stop() { if (m_mediaPlayer && isPlaying()) { libvlc_media_player_stop(m_mediaPlayer); emit stopped(); } m_timer.stop(); } bool VlcAudioPlayer::isPlaying() const { if (!m_mediaPlayer) return false; return libvlc_media_player_is_playing(m_mediaPlayer) != 0; } void VlcAudioPlayer::checkPlayback() { if (!m_mediaPlayer) { m_timer.stop(); return; } if (!isPlaying()) { m_timer.stop(); emit finished(); } }
  • 0 Votes
    1 Posts
    44 Views
    No one has replied
  • How to disable screensaver on Qt6.9.1 Android App

    Unsolved Mobile and Embedded
    16
    0 Votes
    16 Posts
    399 Views
    SMF-QtS
    I have tried various ways to get "getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)" running however the only solution that works for me is to put it in the "onCreate" method in the QtActivity java class (Qt6.9.1) . It really needs to be conditional but I don't know enough about java to do that. Any suggestions welcome.
  • Bootsmann - minimalistic REST API test application

    Unsolved Showcase
    4
    0 Votes
    4 Posts
    208 Views
    piervalliP
    I thought a 3 tree where a node is category and leaf is the request Category 1 Test 1 Test 2 Category 2 Test 1 Test 2 Category 3 Test 1 Test 2
  • 0 Votes
    2 Posts
    41 Views
    F
    What Python version are you using? Starting from 3.11, tomllib is used which should be able to handle it. For older versions, a manual parser is used, which may fail.
  • Qt Creator and Qt Design Studio integration (and Loader Component)

    Unsolved QML and Qt Quick
    1
    0 Votes
    1 Posts
    37 Views
    No one has replied
  • Using ASM (x86) with Qt on MacOS with CMake. How?

    Unsolved General and Desktop
    2
    0 Votes
    2 Posts
    75 Views
    I
    @bogong said in Using ASM (x86) with Qt on MacOS with CMake. How?: What is missing by me? That the error messages imply that you try to use x86 assembly but your compilation is targeting arm64 (hence the assembler's complaints about the eax register not existing; and you getting offered ARM mnemonics like movz, probably in response to you trying to use the movl mnemonic which is x86 only). Make sure you target only x86_64 in your build (in CMake, you have CMAKE_OSX_ARCHITECTURES). Or if you want to target ARM, you need to use ARM assembly code which is completely different to x86 assembly. If you are building universal binaries, then you need to write a different version of the inline assembly block for each architecture, and direct to the correct one with preprocessor macros. May I ask why you think you need inline assembly? There is quite possibly an easier approach.
  • Segmentation fault when exiting when linked against Qt 6.9.1

    Solved General and Desktop
    36
    0 Votes
    36 Posts
    3k Views
    Axel SpoerlA
    Thanks @JonB for notifying! The dock widget implementation has some obvious limitations, like e.g. permissions: You can limit allowed main window dock areas, but not the permission to dock on a floating dock. You can’t merge floating docks. That said, we’ll have to take a deeper look and come up with a solid concept for a quick control equivalent. My guess is a year or so. I’ll update this thread in case we have a Jira ticket for input and discussion. In the meanwhile feel free to post ideas here!