Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • QTableView SIGSEGV by repaint and destruction

    Unsolved
    3
    0 Votes
    3 Posts
    362 Views
    B
    Thank you for the quick answer. I suggest, that the last thing you mentioned is where the failure occures, i will try to solve this (this is the point i notice that my last programming exercise is a few years ago). The other point i have fixed also, thank you for this.
  • Qt Unit testing Error Please Help!!

    Unsolved
    2
    0 Votes
    2 Posts
    342 Views
    aha_1980A
    Hi @Amogh, do you use QTEST_MAIN? If not, please show your main function resp. use QTEST_MAIN. Regards
  • Should I put connect to another thread?

    Solved
    3
    0 Votes
    3 Posts
    271 Views
    M
    @jsulm Great. Thanks
  • 0x0000135;DLL not found build error.

    Unsolved
    4
    0 Votes
    4 Posts
    425 Views
    jsulmJ
    @Pada_ Please take a look at INSTALL file included in the sources: it describes how to build for Windows.
  • Academic question - how to manage Qt "many colors"?

    Unsolved
    21
    0 Votes
    21 Posts
    3k Views
    jsulmJ
    @AnneRanch I guess you mean this: #include <QApplication> #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow mainWin; // Your main window instance mainWin.show(); // This shows your main window on the screen, this call does not block return app.exec(); // This starts the Qt event loop (https://doc.qt.io/qt-5/qapplication.html#exec). exec() call does not return until your application is closed. }
  • Qt with WinRT C++ build issue

    Solved
    4
    0 Votes
    4 Posts
    528 Views
    Cobra91151C
    I have fixed the issue by adding #undef X64 before #include "winrt/Windows.System.Diagnostics.h". For some reason this define conflicts with the ProcessorArchitecture::X64 enum in Windows.System.0.h as stated by VVV user from: https://stackoverflow.com/questions/58436766/qt-with-winrt-c-build-issue/58440774#58440774. The issue is resolved.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • [Question] How to add proper geometry to window to support dual monitors

    Unsolved
    2
    0 Votes
    2 Posts
    242 Views
    SGaistS
    Hi, From the top of my head I would try to use QDesktopWidget and QScreen to query the geometry of the whole desktop and set your widget to that. Hope it helps
  • 0 Votes
    2 Posts
    2k Views
    Y
    It may save other time. Call below function from installer.qs for creating *.desktop file you can call prototype by this. desktopFileCreateOnLinux() from any function in side component script. Below script will create the two place *.desktop file. inside the @TargetDir@/ inside ~/.local/share/applications/ (it will help while searching from Show application). prototype definition: Component.prototype.desktopFileCreateOnLinux = function() { if ((systemInfo.kernelType === "linux") ||(systemInfo.kernelType === "Linux")) { var dir = installer.value("TargetDir"); component.addOperation("CreateDesktopEntry", "Squidstat.desktop", "Type=Application\nName=Squidstat\nExec=\'"+dir+"/SquidStat.sh\'\nGenericName=The IDE of choice for Squidstat handle.\nIcon="+dir+"/Squidstat.png\nTerminal=false\nCategories=IDE;Qt;"); component.addOperation("CreateDesktopEntry", "@TargetDir@/Squidstat.desktop", "Type=Application\nName=Squidstat\nExec=\'"+dir+"/SquidStat.sh\'\nGenericName=The IDE of choice for Squidstat handle.\nIcon="+dir+"/Squidstat.png\nTerminal=false\nCategories=IDE;Qt;"); } }
  • How to customize layout with CSS

    Unsolved
    11
    0 Votes
    11 Posts
    3k Views
    SGaistS
    @Pl45m4 That was a spammer.
  • Windows 10 HighDPI support recommend practice

    Unsolved
    1
    0 Votes
    1 Posts
    399 Views
    No one has replied
  • [Solved] error: [debug/moc_mainwindow.cpp] Error 1

    16
    0 Votes
    16 Posts
    64k Views
    E
    @MarcosAD said in [Solved] error: [debug/moc_mainwindow.cpp] Error 1: I know this is a very old post but I've just bumped into it. This could be helpful. This kind of errors: [debug/moc_mainwindow.cpp] Error 1 [debug/moc_*cpp] Error 1 might come when declaring class data members in the slots / signals section by mistake. In my case I've got the same error: I use enum members of 3.h file in 1.cpp file, the 3.h file wasn't included into 1.cpp file (and no warning from Qt Creator 12.3.1). Also, when I have the same enum in 1.h and in 3.h files and use it in 1.cpp file.
  • Diagonal half black window

    Unsolved
    5
    2 Votes
    5 Posts
    1k Views
    Cobra91151C
    @JoZCaVaLLo Hello! Regarding this issue, it could be the problem with Visual Studio 2019 compiler (graphics glitch), check out these links: https://ddgobkiprc33d.cloudfront.net/d4a40f37-5d0a-47f3-bf18-91956331efd3.gif?fbclid=IwAR05nfPjDYjIZBM9_ve8UvKgTL2mZ97obhutKphJo8cAs0vG2CxW2wfT1e4 https://bugreports.qt.io/browse/QTBUG-75280?fbclid=IwAR2U04xIY0J2c-ABFwxVjEh8lHmBtog6F6rtUoymm5Ds0C_wgSi6EBkiWBk https://developercommunity.visualstudio.com/content/problem/547684/visual-studio-20191602-generator-incorrect-code-wi.html?fbclid=IwAR0cKYfrn5xTCtXaT3VJcK9b7LjoVOHFigWQzVESIOEpjCuzDhdr7Mm4s5k https://developercommunity.visualstudio.com/content/problem/591474/qt-598-sharedstatic-build-with-msvc-2019-issue.html?fbclid=IwAR2rI5xDWbIAZH-cYN1GpwbksvPnTlcvyr1Z3VwtHybdAMniA2_Y9ch5J-4 But it could be already fixed by Microsoft, so you have to check it. Using Visual Studio 2017 compiler it does not have such graphics glitch issue. Also, regarding QML, it can use OpenGL (opengl32sw.dll) or ANGLE (libEGL.dll, libGLESV2.dll). Early this year I done some investigation because of the QML graphics issues on some systems. So, I rebuilt Qt 5.9.X using these parameters: -opengl dynamic -angle -combined-angle-lib -no-feature-d3d12 Then I verified that it working well on Win Vista, 7, 8, 10 and Win 10 IP. You also can try to rebuild Qt using these parameters to check if it fixes your graphics issue.
  • qlineseries with multiple data points

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    R
    I had a test program in python and i was using matplotlib to plot the data. i guess matplotlib does some downsampling in the background, because the plots are responsive. I was just using the same technique here. load all the data points, and plot. do you know of a library that does this, downsample and upsample data? void ConvertToLineSeries(std::vector<Pressure> data, QtCharts::QLineSeries *series) { int count = 0; for(auto &p : data) { if(count == (32 * 10)) { p.GetTimeStamp(); p.GetPressure(); series->append(p.GetTimeStamp().time_since_epoch().count(),p.GetPressure()); count = 0; } count++; } qDebug() << series->points()[0]; } seems to be better , i'm only displaying data every 320 samples which reduced it to 21,875.
  • QT std::sort function is not sorting correctly

    Solved
    10
    0 Votes
    10 Posts
    5k Views
    aha_1980A
    @Ayush-Gupta So please mark this topic as SOLVED now. Thanks!
  • Qt 5.14.0 beta x64 Windows build from source

    Solved
    9
    0 Votes
    9 Posts
    3k Views
    M
    @Christian-Ehrlicher said in Qt 5.14.0 beta x64 Windows build from source: See https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019 Ok, thanks now I understand. Before I wasn't sure what to use because MSCV IDE is 32 bit and it is located in C:\Programs (x86)... path. So I thought the MSVC command line compiler might be a 32 bit tool that produces 64 bit code. But anyway 'vcvarsall.bat amd64' worked fine. The only thing didn't work was building the doc files in a second step. But the doc files are not importend for me in this beta state. Thanks again for your help!
  • bluetooth scanner in qt

    Unsolved
    2
    0 Votes
    2 Posts
    243 Views
    J.HilkJ
    @qt_ankit_developer well, QT comes with such compile ready examples https://doc.qt.io/qt-5/qtbluetooth-btscanner-example.html
  • How to record internal audio for the destop?

    Unsolved
    3
    0 Votes
    3 Posts
    479 Views
    Pl45m4P
    @longer There's actually a Qt Example for this. Have a look here Check out the QAudioRecorder-class in general EDIT: It seems that QAudioRecorder records from microphone source only, but IIRC it's possible to set Windows output as virtual mic input
  • Check if a QPoint lies within a QPolygon

    Solved qpolygon qpoint mousepresseven
    5
    0 Votes
    5 Posts
    2k Views
    H
    @JonB oh that was really stupid. I was meant to check another QVector of QPolygons...
  • Problem with QMenu and Mac

    Solved
    7
    0 Votes
    7 Posts
    657 Views
    mrdebugM
    Solved with the last Qt version.