Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Asynchronous play() for QMediaPlayer

    Solved
    6
    0 Votes
    6 Posts
    405 Views
    S
    Nevermind, I figured it out... So it seems that setSource reasonably expects you to actually have stopped the media beforehand. Doing so and adding a small wait works like a charm and indeed plays it asynchronously! Relevant example. m_player->stop(); QThread::msleep(100); m_player->setSource(url); m_player->play();
  • Static Qt build TLS Network plugins

    Unsolved
    4
    0 Votes
    4 Posts
    361 Views
    SGaistS
    Sorry, I misunderstood the macro documentation. What about: qt_import_plugins(myapp INCLUDE_BY_TYPE tls Qt::QTlsBackendOpenSSLPlugin ) ?
  • Qcustomplot conflicits with ncurses.h

    Unsolved
    7
    0 Votes
    7 Posts
    353 Views
    JonBJ
    @Pl45m4 Ohhhhhhhhhhh, I never noticed..........
  • How to set color of QChart background to radial gradient?

    Unsolved
    2
    0 Votes
    2 Posts
    352 Views
    Pl45m4P
    @Rozerin-YILDIZ said in How to set color of QChart background to radial gradient?: I can change the color of background of qchart with this code: chart->setBackgroundBrush(QBrush(QColor("salmon"))); If you set a plain color, you can't expect to receive any gradient... Use QRadialGradient. https://doc.qt.io/qt-6/qradialgradient.html#details
  • Qt creator doesn't work after vanilla installation

    Unsolved
    3
    0 Votes
    3 Posts
    338 Views
    T
    @jsulm I already had mesa-libGL-devel and most of C dev libs as listed but installed it anyways, also today the installer was updated to 4.8.0 from 4.7.0 but it still doesn't work out of the box. Managed to run it by going to the ~Qt/Tools/QtCreator/bin and running it with QT_QPA_PLATFORM=wayland ./qtcreator and according to xlsclients it does indeed run in wayland mode.
  • 0 Votes
    19 Posts
    2k Views
    jsulmJ
    @Psyger00 said in Program crashes (without error message) when attempting to read a second file into my program: Could you explain what debuger in this contect? Debugger to debug applications. Like GDB on Linux. If you're using QtCreator it already integrates the debugger, just build your app in debug mode and run with debugger.
  • opening a non existing Sqlite Db

    Solved
    12
    0 Votes
    12 Posts
    2k Views
    J
    @MasterQ Check your build directory! Perhaps "devel. db2" is right there! https://doc.qt.io/qt-6/qsqldatabase.html#setDatabaseName "For the QSQLITE driver, if the database name specified does not exist, then it will create the file for you unless the QSQLITE_OPEN_READONLY option is set." I ran your code,"devel. db2" was created。
  • Qt5_DIR-NOTFOUND

    Solved
    13
    0 Votes
    13 Posts
    20k Views
    Z
    [image: 6a125c4f-eb73-444e-a607-a0ee1f58ba58.png] The above image is a successful CMake settings. I am trying to compile the VTK. Now 33% done. I hope I made it.
  • GUI vs Console - QNetworkAccessManager ssl handshake fails error

    Unsolved
    3
    0 Votes
    3 Posts
    187 Views
    SGaistS
    Hi, When you say move, do you mean you kept it as is or did you refactor it ?
  • 0 Votes
    19 Posts
    1k Views
    H
    In the end, the mistake was very simple, in final image reconstruction Format_ARGB32 was used instead of Format_ARGB32_Premultiplied, causing these problems with drawing. Thanks everyone for help!
  • Newly created project doesnt work: cannot find -lGL: no such file or directory

    Solved
    8
    0 Votes
    8 Posts
    926 Views
    M
    This issue is so common on this forum that it would deserve a pinned link somewhere IMO.
  • setting default file extension when creating a new file...

    Unsolved
    16
    0 Votes
    16 Posts
    1k Views
    Pl45m4P
    @MarisaG said in setting default file extension when creating a new file...: I do want it to look like a native app, so i like the way this is working other than the file list Yes, understood. But have you tried it? :) If you try Qt's FileDialog (QFileDialog::DontUseNativeDialog flag set) and there is only one "All Files" left, then you know for sure that it is Haiku's default file dialog that has its own "All Files" (which Qt has no control over).
  • Check current state of QHistoryState

    Unsolved
    3
    0 Votes
    3 Posts
    242 Views
    M
    I have already access to this statemachine and statemachine->configuration() gives me the state after i left the substate/historystate. I want to know if a historystate was entered or in which previous state it was. Lets say i have two different historystates in my statemachine and i have a stop/resume logic. "stop" jumps out of active substate/historystate and "resume" continues the last active historystate. The moment when i trigger "resume" i want to know which historystate was the last active one. I could save that information as member variable but i was hoping that QHistoryState delivers enough information.
  • Style Sheet doesn't work for QTableWidget (or QTableView)

    Solved
    5
    0 Votes
    5 Posts
    305 Views
    R
    The QTablewidget in a QWidget. So I tried to use style sheet in the QWidget. That solved my problem.
  • QTcpSocket: Cannot Connect in a LAN

    Unsolved qtnetwork qtcpsocket tcp
    3
    0 Votes
    3 Posts
    435 Views
    C
    @Sajjad-Ali Quite apart from @JonB's observations: Your receiver is not listening. You need to look at QTcpServer You need to ensure that the receiving end does not have a system firewall blocking whatever port you are listening on.
  • SIMPLIFIED REPOST How to access "parent" from "closeEvent" ? SIMPLIFIED REPOST

    Solved
    24
    0 Votes
    24 Posts
    4k Views
    A
    @mpergand Hello, I have posted more stuff related to my task and it may look as negative toward you. I am posting this to make sure it is not interpreted that way and woudl like to let you know that I do appreciate all the help you have given me. The whole idea of automatic re-tillling of QMdiArea subwindows after one is deleted , was really just "bells and whistles ", nice to have and not essential for my project. This is / was an extremely (sic?) positive , hence beneficial experience for me, with an exception of uncalled for "contributions" AI / RTFM style. I realized that big part of the mess was my silly way to keep the Qt example and add QMdiArea to it. Then I ended up with two instances of same class and it was not easy to keep track of which is which. It really does not matter I did not end up with working code, but I sure can reuse it in my next "GUI class hierarchy " - another B&W project. Yours truly MFTR
  • Coloring slider handle depending on state

    Unsolved
    6
    0 Votes
    6 Posts
    459 Views
    JoeCFDJ
    @ian28 you can update or reset style sheet at running time.
  • related to generate Heatmap

    Unsolved
    11
    0 Votes
    11 Posts
    836 Views
    D
    @xylo212 why don‘t you google for it? you would have found this library. it also has an example to generate a png from the data in the examples folder.
  • Survey: Qt Framework Evaluation

    1
    1 Votes
    1 Posts
    110 Views
    No one has replied
  • QKeyCombination issue

    Unsolved qkeycombination shift
    1
    0 Votes
    1 Posts
    174 Views
    No one has replied