Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • ListWidget with a lot of items

    Unsolved qlistwidget custom widget item delegate qstyleditemdele
    5
    0 Votes
    5 Posts
    896 Views
    EmrecpE
    Can anyone share sample code for qlistwidget or qlistview?
  • Precompile .qm file

    Solved
    4
    0 Votes
    4 Posts
    314 Views
    M
    it's help me system(lrelease QtLanguage_ru.ts)
  • avoiding styleSheet inheritance

    Unsolved stylesheet
    3
    0 Votes
    3 Posts
    6k Views
    redtideR
    FWIW this could be marked ad solved, I had the same issue and solved by setting something like: setStylesheet("#MainWindow{background-color:#000000;color:#ffffff};}")
  • Change language

    Solved
    2
    0 Votes
    2 Posts
    213 Views
    M
    @Mihaill me help QQmlApplicationEngine::retranslate()
  • QSerialPort discovery in a non GUI QThread?

    Unsolved qserialport
    12
    0 Votes
    12 Posts
    2k Views
    CJhaC
    @JonB Yes I noticed the change. I am not sure why they do it the way they are doing it. I am starting a single shot timer and immediately after I am starting the event loop which exits with exit code 1 with the readyRead() signal received or with exit code 0 if the timer runs out. If I have the exit code of 1 I read the port and start the process again till the exit code of 0 is received. Seems simple and works every time.
  • Wireguard client with Qt. How?

    Solved
    2
    0 Votes
    2 Posts
    810 Views
    B
    Issue solved. Look below for getting some info: MazilliaVPN on Github Example of CMake project for developing iOS/MacOS version based on NetworkExtension with Qt 6.5.* or above, but not lower version Some info from Apple Support Recommendation: For iOS/MacOS follow strictly requirements of Apple Support and Guidelines If you using for iOS/MacOS NetworkExtension approach, it will be using one code base for both platforms. But if you using system extension for MacOS - you will be required to develop separate application. Between Sysex and Appex many differences. For Android use MazillaVPN like example If all of it haven't helped you, contact me to hire :-)))
  • Runtime Library error

    Unsolved
    2
    0 Votes
    2 Posts
    177 Views
    JonBJ
    @QtsCOde Set environment variable QT_DEBUG_PLUGINS to value 1 and run the program. You will get diagnostic output indicating what the problem is.
  • How do I create a widget that looks like this

    Unsolved
    4
    0 Votes
    4 Posts
    319 Views
    Pl45m4P
    @additional-pumpkin Custom data view (either custom widget as well or some tableView) with your chess data model. Esp. if you have database-like structures with identifiers for "moves" or any other action that is going on. You could start here: https://doc.qt.io/qt-6/model-view-programming.html https://doc.qt.io/qt-6/model-view-programming.html#model-classes https://doc.qt.io/qt-6/model-view-programming.html#designing-a-model To have it displayed neatly, you could make your own delegates to show your data (moves) with the matching icon for every chess figure and more things you might want to add / display.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    23 Views
    No one has replied
  • c++11 range-loop might detach Qt container (QSet) [clazy-range-loop-detach]

    Solved
    12
    0 Votes
    12 Posts
    7k Views
    O
    @JonB :]
  • Firebase c++ SDK in QT6.5

    Unsolved
    4
    0 Votes
    4 Posts
    919 Views
    SGaistS
    Searching for them I found: https://firebaseopensource.com/projects/firebase/quickstart-cpp/
  • Speedup CMake with Qt. How?

    Solved
    6
    0 Votes
    6 Posts
    2k Views
    B
    This manual might be the solution for speeding up build process with Xcode. For me it's enough. It's building much faster with this defined parameters in MacOS defaults. Through QT Creator haven't found any solution, using this commands in terminal: $ sysctl -n hw.ncpu 8 $ defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 8 The "-- -j8" with Xcode cause the fail: xcodebuild: error: invalid option '-j8' For me all is done. Issue closed. It's became slightly faster. But never the less QMake working faster.
  • Is there a way to program without using the Qt Creator?

    Solved
    5
    0 Votes
    5 Posts
    5k Views
    N
    @SGaist said in Is there a way to program without using the Qt Creator?: Hi and welcome to devnet, Qt is not bound to Qt Creator at all. Qt Creator is a nice and simple cross-platform IDE that allows you to have a consistant development environment accros platform. Qt itself is a C++ framework that is agnostic of the IDE. It provides integration with Visual Studio to help manage the projects aspects but you can use Notepad if you want to write your code. The one thing that you need is the compiler, either Visual Studio C++ tools or MinGW. The latter you can download from the Qt online installer. One core thing is to use CMake as project manager. It has integration for a Qt since a pretty long time and has become the official tool to both build Qt itself and user projects although qmake is still supported currently. @Chris-Kawa said in Is there a way to program without using the Qt Creator?: @nore said: It is my understanding that these gui tools such as wxWidgets and Qt and even WPF are built up from the tools laid out by MFC in order to allow for easy creation of graphical user interfaces--is this correct? No. MFC is Microsoft's older application framework including UI and other utilities. Those other libraries you mentioned are not based on MFC. They are its alternatives. At low level both MFC and Qt use WinAPI i.e. the Windows' system level API, along with GDI for graphics and a bunch of other technologies, like COM, but MFC and Qt are completely separate frameworks. MFC is pretty dated at this point and does not use modern technologies like hardware acceleration through DirectX. WPF is also a bit older technology, based in the .Net framework and mostly used with C# (although it's not limited to it). Modern day Windows UI framework is WinUI as part of the Windows App SDK. You can use it with .Net or C++ with the help of C++/WinRT library. The strength of Qt compared to it is that it is cross platform and often far easier to use. The downside is that you can't access some of the bells and whistles of the latest Windows UI, like the previous Aero, Metro and now Fluent design elements. and prefer to write code within my own IDE to create guis, is this possible by means of some Qt library or api? As others mentioned QtCreator is just an IDE. It's well suited for Qt development, but not by any means necessary. Same goes for CMake. It's currently the most supported project generator, but you can use anything. As an example I've worked on a project that used premake/MSBuild with Visual Studio/Visual Studio Code and also on a completely custom solution. It all boils down to the amount of manual setup you need to do to integrate Qt into your project, but it can be used with pretty much anything down to a notepad and command line. Awesome, thank you for the information. Chris' layout of the api information really helps. I will look around.
  • App crashing on dropevent in QtabWidget

    Solved drag and drop qtabwidget mouseevent crash app qt6.5
    8
    0 Votes
    8 Posts
    1k Views
    jsulmJ
    @Narutoblaze Please read again what @JonB wrote. Especially what he copied from Qt documentation...
  • QSerialPort waitForReadyRead() only works in certain situations.

    Solved qserialport
    3
    0 Votes
    3 Posts
    677 Views
    CJhaC
    @J-Hilk Thank you so much, it fixed the problem :)
  • How to paint above the widget original painting?

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    Pl45m4P
    @jeremy_k said in How to paint above the widget original painting?: Sometimes the lesson is more memorably when someone else loses a foot. :D Emphasizing someone else losing a foot. 🤣
  • Qt Bluetooth

    Unsolved
    2
    0 Votes
    2 Posts
    156 Views
    C
    @Aleksey_777 Install working Bluetooth device drivers for your Bluetooth transceiver. Otherwise, provide more information.
  • unresolved external symbol error

    Unsolved
    3
    0 Votes
    3 Posts
    474 Views
    Paul ColbyP
    Hi @Bineere, While defining (not just declaring) the template function in the header, as @Chris-Kawa suggested, is the easier, more generalised solution, if you do need / want to keep the implementation private, you can provide explicit instantiations within your Numbers translation unit by adding something like this to the end of your Numbers.cpp file: template bool Numbers::isPerfectPower(const double &number, const int &n); But then you have to do this for all typename T types you want to support, eg: // Explicit template instantiations. template bool Numbers::isPerfectPower(const float &number, const int &n); template bool Numbers::isPerfectPower(const double &number, const int &n); template bool Numbers::isPerfectPower(const long double &number, const int &n); If you wanted to support integers, you'd have to add explicit instantiations for those too, but since you're using std::numeric_limits<T>::epsilon(), I assume you're happy to only support floating point types for now. Cheers.
  • After./configure is not creating a makefile.

    Solved
    4
    0 Votes
    4 Posts
    633 Views
    Christian EhrlicherC
    And what's the problem - did you provide the static libs for those libraries? I mean - you even said that you want to use openssl-linked ... so what do you expect? I really don't understand the hype to link stuff statically ...
  • Post events before exec causes lost connects

    Solved
    4
    0 Votes
    4 Posts
    283 Views
    ocgltdO
    After some testing I can confirm events (signals) are queued up and once .exec() is called those events are processed. Calling connect before .exec() always works fine. I think I was thrown by some old/wrong posts that posting events/connects before the event loop starts are lost.