Skip to content
  • 144k Topics
    721k Posts
    V
    I tried building a video player like this: example.pro: QT += core gui widgets multimedia multimediawidgets CONFIG += c++17 SOURCES += main.cpp main.cpp: #include <QApplication> #include <QWidget> #include <QPushButton> #include <QVBoxLayout> #include <QMediaPlayer> #include <QVideoWidget> #include <QUrl> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget window; window.resize(640, 480); QVideoWidget *videoWidget = new QVideoWidget; QMediaPlayer *player = new QMediaPlayer; player->setVideoOutput(videoWidget); //player->setMedia(QUrl::fromLocalFile("/home/user/Downloads/sample-5s.mp4")); // also works player->setMedia(QUrl("https://file-examples.com/storage/feaa6a7f0468517af9bc02d/2017/04/file_example_MP4_480_1_5MG.mp4")); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(videoWidget); window.setLayout(layout); window.show(); player->play(); return app.exec(); } If I build and run this under ArchLinux with the packages qt5-base and qt5-multimedia installed, it works fine (except for a segmentation fault on exit, but that is a different topic). If however, I build and run this in nixos with nix-shell -p qt5Full libsForQt5.qt5.qtmultimedia I get an empty window, with nothing in stdout or stderr. If I run it with QT_DEBUG_PLUGINS=1 I cannot spot anything suspicious in the output. Any idea how to make progress here? Is that a bug in the nixos package of Qt?
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    J
    Hello, before using ->setCurrentWidget(), you can check if that widget is already contained in that stack widget or not. you can m_centralStackedWidget->indexOf(m_windowSplitter) to find out if the widget is present in the stackwidget or not, it will return "-1" if the widget is not present in stackwidget
  • Everything related to designing and design tools

    127 382
    127 Topics
    382 Posts
    R
    I see this is an old thread and I see several unresolved threads on this topic. I'm leaving this incase it helps someone else who ends up here. The solution was twofold for me. Go to File > Export Project and select Enable Python Generator. This will create a main.py. Make sure you pip install PySide6-DS Hope this helps someone.
  • Everything related to the QA Tools

    76 212
    76 Topics
    212 Posts
    A
    Hello, we're using the squish teamcity plugin and were wondering whether it was possible to configure the test report a bit more to our liking. We'd like the JUnit XML report and disable the other reports. It seems that in the TC build step it isn't possible to add/override the --reportgen option: [image: 8219c95e-dd8d-4dd6-93e9-72024cd65943.png] What are our options? Cheers, Adam
  • Everything related to learning Qt.

    379 2k
    379 Topics
    2k Posts
    T
    I can't edit my previous message now but I finally managed to run the program. It seems that the file path was too long, and by renaming my project to "Challenge1" (it was previously called "QML-for-Beginners-Challenges-Intro-to-QML"), it worked.
  • 2k Topics
    13k Posts
    SGaistS
    Hi, I think you went the too complicated road: quint16 calculateCrc16Arc(const QByteArray &data) { quint16 crc = 0x0000; const quint16 poly = 0xA001; for (char byte : data) { crc ^= (static_cast<quint8>(byte)); for (int i = 0; i < 8; i++) { crc = (crc & 0x0001) > 0 ? (crc >> 1) ^ poly : (crc >> 1); } } return crc; }
  • 4k Topics
    18k Posts
    P
    Na początek windeployqt, ale to do końca nie rozwiązuje problemu. Łopatologicznie tworzysz katalog bin, wrzucasz exe i własne dll, konfiguracja. Przerzucasz pliki bibilotek z kompilatora do bin, jak używasz QML, przerzucasz podkatalog qml z kompilatora. Wyrzucasz biblioteki partiami i uruchamiasz APK, póki ci się nie wywali. Jest bardzo dużo zależności między bibliotekami. Nawet nie zobaczysz braków używając dependencis. Jak chcesz uruchamiać tylko u siebie to wystarczy bat, a w nim rozszerzenie ścieżki path przezd uruchomieniem exe, podanie w niej ścieżki do bin, lib, qml
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    @RokeJulianLockhart to the best of my knowledge, no. The first release of Discourse was in 2014 and the forum is several years older than that.