Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Why is qmake/jom trying to use unix commands on windows?

    Solved
    9
    0 Votes
    9 Posts
    895 Views
    hskoglundH
    Don't worry about the forward slashes in $${DESTDIR} for the Win32 section, they will work the same as backslashes inside directory paths :-)
  • Building qt from source (debug) error LNK2038

    Unsolved
    8
    0 Votes
    8 Posts
    833 Views
    Christian EhrlicherC
    @Norzka said in Building qt from source (debug) error LNK2038: I have tried that too. I get the same error. And I could, but I get a runtime error, something about string conversion, looking online suggests that it is to do with QT and your project being compiled with different STLs, so that's what made me try to build from source. From what are you talking? Using your Qt or the pre-compiled ones? Use the pre-compiled ones with a proper CMakeLists.txt for your project and you won't get problems with different runtimes. Somehwere you mix /MT(d) with /MD(d) which must not be done.
  • 0 Votes
    5 Posts
    885 Views
    A
    @jsulm I got it now. Thank you!!
  • Using a custom mainwindow subclass in Creator/Designer?

    Unsolved
    18
    0 Votes
    18 Posts
    3k Views
    M
    @visinet said in Using a custom mainwindow subclass in Creator/Designer?: I currently have over 70 unique device windows/views that need to be created, with each one having 500 to 1000 or more label I can't imagine how cumbersome it will be to create 100's of labels in Designer ! By code, you can use loops. You need to carefully design your windows/views subclasses to avoid pitfalls/dead end.
  • 0 Votes
    6 Posts
    356 Views
    jsulmJ
    @Pappu-Kumar-Keshari Did you actually address what @SGaist told you? Where is simplified code? Did you remove QSqlDatabase member variable? Or do you simply want that somebody fixes your code for free?
  • Qt 5.9 on Windows

    Solved
    3
    0 Votes
    3 Posts
    241 Views
    C
    @jsulm Yes, thank you
  • QWebsocket disconnect signal getting after a particular time delay

    Unsolved
    1
    0 Votes
    1 Posts
    178 Views
    No one has replied
  • TLS initialization failed: Downloading Android SDK Tools

    Unsolved
    12
    3 Votes
    12 Posts
    4k Views
    Pete CarterP
    In Fedora Linux 38 sudo dnf install openssl1.1 Try to Set Up SDK again and it should work
  • Qt Bluetooth with socket...

    Unsolved
    1
    0 Votes
    1 Posts
    94 Views
    No one has replied
  • Qt Application like daemon. How?

    Unsolved
    15
    0 Votes
    15 Posts
    3k Views
    JoeCFDJ
    @bogong I guess service is what you need on Linux/MacOS. Qt may not be needed here at all.
  • Need implementation pattern for REST token header fetch and set

    Unsolved
    2
    0 Votes
    2 Posts
    185 Views
    JonBJ
    @JohnGa You just need to await (i.e. do nothing, let the Qt event loop run, until signal arrives) either finished or error on the network reply to your first request, then you are ready to send the second one. You can maintain state for where you are --- e.g. a list of calls to make or functions to call after each one or state/number --- in a single slot handler if you wish. Rather than, say, keep changing which slot function is connected for each call.
  • Viewing huge files with a Qt app

    Unsolved
    23
    0 Votes
    23 Posts
    7k Views
    JonBJ
    @deisik said in Viewing huge files with a Qt app: No, just try opening a 90Mb file with QTextEdit (QPlainTextEdit), then feel free to make statements that "something is not right" Just tried an 86MB file read into QPlainTextEdit and displaying it. About 8 seconds. Not exactly "hours". Now can I make my statement suggesting that "something is not right" in your estimation/finding? And btw this is considerably quicker that loading it into a text editor. That file (typical text?) came out as 2.5 million lines of text. As an end user I'm not sure what the point of displaying that many lines to me is anyway. So you still have the option of only reading/displaying portions as user scrolls to reduce it considerably if you wish.
  • QItemEditorCreatorBase with custom enum

    Solved
    11
    0 Votes
    11 Posts
    648 Views
    Axel SpoerlA
    @InTheBeninging Nice, good that you got it working. Some minor beautification nits: text values could be stored in an array and the enum value be used as the index. the function could be static constexpr. in switches over enums, I don't use default. That way, the compiler rants at me, if I have (again!!) forgotten to implement new enum values. Q_UNREACHABLE()can be added after the switch, but it doesn't like static constexpron some platforms.
  • How to make Qt's window not blocked by windows system menus?

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    Y
    @Abderrahmene_Rayene Thank you for your method, but it won't work on Windows. I have resolved the issue by setting permissions for the UI
  • get selected single cell in QTextTable?

    Solved
    7
    0 Votes
    7 Posts
    470 Views
    M
    @JonB Yes, JonB, Bob64's answer is right. I get QTextTableCell using QTextTabl..cellAt(textCursor), and get row and col index using .row() and .colunm() function.
  • QT program automatically exits after I run under debug mode

    Solved
    3
    0 Votes
    3 Posts
    541 Views
    JonBJ
    @Giti_zsx said in QT program automatically exits after I run under debug mode: ~"[Inferior 1 (process 10484) exited normally]\n" Looks like the program being debugged exited normally.
  • Detecting a drop- or drag cancel event outside of my application

    Solved
    3
    0 Votes
    3 Posts
    391 Views
    qwasder85Q
    @Abderrahmene_Rayene That sounds like a good idea, I'll try this. Edit: Works like a charm, thank you!
  • Qt Linux ad ffmpeg6

    Solved
    18
    0 Votes
    18 Posts
    1k Views
    mrdebugM
    Hi, in order to use ffmpeg 6 libraries in a custom software it is mandatory to compile the source using this swich "--enable-pic" and include the header in this way: extern "C" { #include <libavutil/frame.h> #include <libavutil/mem.h> #include <libavcodec/avcodec.h> }
  • 0 Votes
    7 Posts
    4k Views
    kkoehneK
    @Norzka said in Problems with building qt from source (it doesn't generate lib files): D:\Libraries\Qt\6.6.0\Build\plugins\styles\qwindowsvistastyle.lib Hang on, why do you expect a .lib file for a plugin, that is supposed not to be linked to (it is loaded at runtime)? There should be a .dll, but not a .lib file. Do you (try to) explicitly link against the plugin nevertheless, in your project file? Or do you somehow try a static build (which would require Qt to be built statically, too)?
  • QtConcurrent headers ?

    7
    0 Votes
    7 Posts
    14k Views
    B
    @kegon I'm using qt5 with cmake, I tried this command: find_package(Qt5 COMPONENTS Widgets Concurrent REQUIRED PATHS ... NO_DEFAULT_PATH) but it didn't work, I still have to use #include <QtConcurrent/QtConcurrent>