Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • How to correctly use database

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    Thank YouT
    @jsulm Thanks it helped a lot
  • Widgets component is not recognized in CMakeList file

    Solved
    2
    0 Votes
    2 Posts
    297 Views
    M
    The problem is solved. I had to install libgl1-mesa-dev Best Milosz
  • No CMake configuration found

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    M
    The problem is solved. I had to install libgl1-mesa-dev Best Milosz
  • Real time push button click check

    Unsolved
    4
    0 Votes
    4 Posts
    284 Views
    JonBJ
    @knyitra Yes to lambda. You only need to foreach if you want to connect in retrospect; if you do the connect()s immediately after you create each QPushButton as you go along you don't need to revisit them.
  • Qt 5.15.2 static build on Windows / MinGW with openssl

    Unsolved
    3
    0 Votes
    3 Posts
    849 Views
    AxelViennaA
    And this is config.log with the alloca.h error Command line: -static -release -platform win32-g++ -opensource -confirm-license -prefix C:\Qt\Static\5.15.2 -qt-zlib -qt-libpng -qt-webp -qt-libjpeg -qt-freetype -openssl-linked -no-opengl -skip qt3d -skip doc -skip webengine -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtsensors -skip qtspeech -skip qtsvg -skip qtwayland -skip qtwebglplugin -skip qtwebview -skip webengine -make libs -nomake tools -nomake examples -nomake tests loaded result for config test config.qtbase.tests.verifyspec + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\verifyspec && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\verifyspec && set MAKEFLAGS=& mingw32-make > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\verifyspec -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++ -o verifyspec.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\verifyspec\verifyspec.cpp > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o verifyspec.exe verifyspec.o test config.qtbase.tests.verifyspec succeeded loaded result for config test config.qtbase.tests.architecture + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\arch && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/arch + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\arch && set MAKEFLAGS=& mingw32-make > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\arch -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++ -o arch.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\arch\arch.cpp > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o arch.exe arch.o Detected architecture: x86_64 (cx16 mmx sse sse2 sse3) test config.qtbase.tests.architecture gave result x86_64 loaded result for config test config.qtbase.tests.sse2 + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" "CONFIG+=add_cflags" "DEFINES+=NO_ATTRIBUTE" "SIMD=sse2" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/x86_simd + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && set MAKEFLAGS=& mingw32-make > g++ -c -fno-keep-inline-dllexport -msse2 -mstackrealign -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DNO_ATTRIBUTE -DQT_COMPILER_SUPPORTS_SSE2 -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++ -o main.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd\main.cpp > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o x86_simd.exe main.o test config.qtbase.tests.sse2 succeeded loaded result for config test config.qtbase.tests.aesni + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" "CONFIG+=add_cflags" "DEFINES+=NO_ATTRIBUTE" "SIMD=aesni" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/x86_simd + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make > del main.o > g++ -c -fno-keep-inline-dllexport -maes -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DNO_ATTRIBUTE -DQT_COMPILER_SUPPORTS_AESNI -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++ -o main.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd\main.cpp > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o x86_simd.exe main.o test config.qtbase.tests.aesni succeeded loaded result for config test config.qtbase.tests.alloca_h + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\alloca_h && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" C:/Qt/Static/src/qt-everywhere-src-5.15.2/config.tests/alloca_h + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\alloca_h && set MAKEFLAGS=& mingw32-make > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++ -o main.o main.cpp > main.cpp:2:10: fatal error: alloca.h: No such file or directory > #include <alloca.h> > ^~~~~~~~~~ > compilation terminated.
  • QVideoWidget can't change saturation on macOS

    Unsolved qvideowidget macos catalina
    3
    0 Votes
    3 Posts
    670 Views
    S
    Windows is running in a Virtual Machine (KVM) with Linux as its host, and the macOS is a Mac Mini Classic at MacInCloud.
  • Trying to implement a drop function on a QFrame, help please!

    Solved
    7
    0 Votes
    7 Posts
    545 Views
    fabriciokashF
    @Pl45m4 Thanks for suggestion! But for while thats all i need in this moment. I'll see the topic and learn about, thanks. @JonB I fixed that too, got it! haha. I just used the method setFixedSize. its all i need at the moment, thanks!
  • QtCreator 4.15.2 failed to integrate with perforce

    Unsolved
    6
    0 Votes
    6 Posts
    380 Views
    SGaistS
    What if you start it with QT_LOGGING_RULES="*.*=true" set ?
  • Using FreezeTableWidget in QTableWidget

    Unsolved
    2
    0 Votes
    2 Posts
    235 Views
    SGaistS
    Hi, Are you trying to use the frozen column example as a base ? On a side note: @IknowQT said in Using FreezeTableWidget in QTableWidget: class QCustomTableView : public QTableWidget You should avoid using Q as your own class prefix as this is misleading in terms of where that class comes from. Also, you are subclassing QTableWidget and not QTableView so your subclass is name is again misleading.
  • uinput thread and UI

    Solved
    5
    0 Votes
    5 Posts
    291 Views
    gfxxG
    thanks to all .... I'm not a good programmer ... so I wasn't sure it was throwaway stuff. I was afraid I had missed a few pieces. Rewrite for sure. Thank you.
  • Qt with yaml-cpp in qrc file

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    KH-219DesignK
    I agree with @KroMignon 's approach. Another alternative (in case it becomes appealing for any other reason) is to use QTemporaryFile: // note the ":" at the front of the path std::string path_inside_qrc = ":/data/sim_rpc_replies_immediate_scores.pbtxt"; std::unique_ptr<QTemporaryFile> temporary_file; temporary_file.reset( QTemporaryFile::createNativeFile(QString::fromStdString(path_inside_qrc)) ); std::string file_name = temporary_file->fileName().toUtf8().constData(); // TODO: add code to use the temporary file. // Delete the temp file after using it temporary_file.reset(); (This is "self plagiarism" from this prior discussion thread.)
  • show message when setting SetOverrideCursor()

    Solved
    3
    0 Votes
    3 Posts
    280 Views
    lincolnL
    @Cobra91151 great man, thanks for your answer, I was able to solve my problem already. thanks again.
  • StyleSheet not applying when a child is declared

    Unsolved stylesheet qwidget inheritance
    1
    0 Votes
    1 Posts
    558 Views
    No one has replied
  • Appending Qtablewidget row contents to qLineEdits

    Unsolved
    27
    0 Votes
    27 Posts
    4k Views
    C
    @mrjj hello Mr. JJ, I am having challenge retrieving data into a qTablewidget. I have been retrieving data into qtablewidget before. I used qtable in storing the data into the database and one of the columns in the table used qcombobox. Is it that I will have to retrieve that data into a qcombobox too? I am asking this because I'm not seeing any error in my retrieval code.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    18 Views
  • QTreeWidgetItem error while get data

    Solved
    2
    0 Votes
    2 Posts
    194 Views
    SGaistS
    Hi, @Creatorczyk said in QTreeWidgetItem error while get data: QtCore\qglobal.h:688: error: static assertion failed: Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt's meta-object system You have here what to do to be able to do what you want.
  • How to test with code readAllStandardError.isEmpty() is not empty ?

    Solved
    4
    0 Votes
    4 Posts
    310 Views
    raven-worxR
    @Qt-embedded-developer in my example this shouldn't be possible. So i guess your question is based on different usage? My example connects to the readyReadStandardError signal, which ensures that there is data available, further it checks if it can read a line before it finally reads the line. Thats the way to go if you want the stderr output during the execution of the process. Use readAllStandardError() on the other hand after the process has finished.
  • Problem creating text file

    Solved
    3
    0 Votes
    3 Posts
    247 Views
    SPlattenS
    @raven-worx Thank you!
  • How can I connect a signal to Qtimer slot start()

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    J.HilkJ
    @dziko147 connect(this,SIGNAL(signalgetdataclicked()),this,SLOT(m_fetchFrameTimer.start(2000))); since you're probably trying to start the timer with different times, I would suggest a custom signal for this: signals: .... void startFetchFrameTimer(int interval); and use that in a "regular" connect, Old syntax: connect(this, SIGNAL(startFetchFrameTimer(int)), &m_fetchFrameTimer, SLOT(start(int))); new Syntax connect( this, &Backend:: startFetchFrameTimer, &m_fetchFrameTimer, qOverload<int>::of(&QTimer::start)); then you just emit the signal wherever you want, and you're fine to go: emit startFetchFrameTimer(1000);
  • Taskbar Menu

    Unsolved
    4
    0 Votes
    4 Posts
    331 Views
    Pl45m4P
    @Nan-Feng said in Taskbar Menu: can I intercept the close event in the right-click menu on the taskbar? You can use the closeEvent, but then it will activate every time you try to close the window, no matter how. But how should it be judged that it is the closing event of the taskbar menu? AFAIK, Qt can't differenciate that. Because there is a close event triggered from a button on the form, we need to judge. Create two cases: First case: You click your button... It's very easy to tell, if you close your window with your own button Second case: Every other close event: Your button was not clicked