Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • buttons of different sizes

    Solved
    5
    0 Votes
    5 Posts
    326 Views
    Thank YouT
    @IknowQT You can use any type of techniques to do frontend. Another option is Using spacer and using maximum width [image: fd4d863e-ed64-45f1-98e9-a0af4b678bca.jpg] See on the properties panel on vertical policy As I said there are many other techniques to obtain same type of design. [image: 6ea000b1-6329-40c1-b579-33303b06f066.jpg] This one is output
  • method 'connect' vanished!

    Solved
    4
    0 Votes
    4 Posts
    3k Views
    Thank YouT
    @Strangelove Hello Sir, Mark it as solved then Thank You
  • System Version

    Unsolved
    4
    0 Votes
    4 Posts
    620 Views
    Cobra91151C
    Hello! You can use the QOperatingSystemVersion class (https://doc.qt.io/qt-5/qoperatingsystemversion.html). The current() method (https://doc.qt.io/qt-5/qoperatingsystemversion.html#current) returns the current OS and its version number. Feel free to check out my code below. Code: QOperatingSystemVersion currentOSVersion = QOperatingSystemVersion::current(); if (currentOSVersion >= QOperatingSystemVersion::Windows10) { qDebug() << "Windows 10 build: " + QString("%1.%2.%3").arg(QString::number(QOperatingSystemVersion::current().majorVersion()), QString::number(QOperatingSystemVersion::current().minorVersion()), QString::number(QOperatingSystemVersion::current().microVersion())); } else if (currentOSVersion >= QOperatingSystemVersion::Windows7) { qDebug() << "Windows 7 build: " + QString("%1.%2.%3").arg(QString::number(QOperatingSystemVersion::current().majorVersion()), QString::number(QOperatingSystemVersion::current().minorVersion()), QString::number(QOperatingSystemVersion::current().microVersion())); } My code only checks for Win 10 and Win 7, but you can check also for other operating systems for example: Win 8 and Win 8.1. Happy coding!
  • Why does the size of the file grow so much with each release without changing the code?

    Unsolved
    54
    0 Votes
    54 Posts
    11k Views
    D
    @Thank-You Normal work may be temporary. I have good and bad times here
  • QCompleter custom popup position is not correct

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    A
    @eyllanesc Thank you a lot! It's really simple than I thought, you saved me from doing extra works
  • QSortFilterProxyModel will filter but not sort

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    JonBJ
    @ocgltd , @KroMignon Upon review, that sample code does go proxyView->sortByColumn(1, Qt::AscendingOrder);. I searched it, and my code, for sort(. So maybe that is in my code and would explain.
  • Touchscreen behaviour via RDP

    Unsolved
    8
    0 Votes
    8 Posts
    630 Views
    SGaistS
    5.15.3 means a commercial LTS release, they should leverage that and check with the Qt Company.
  • Spell checking for QML TextEdit. How?

    Solved
    3
    0 Votes
    3 Posts
    533 Views
    eyllanescE
    @bogong The Spellchecker you must implement using QSyntaxHighlighter, you can take the following examples as base: https://stackoverflow.com/a/53837628/6622587, where a QSyntaxHighlighter is placed to a TextEdit (TextArea inherits TextEdit) https://stackoverflow.com/a/67865082/6622587, where I implement spellchecked using QSyntaxHighlighter but in python that can be translated into C ++ using hunspell and QRegularExpression.
  • QGraphicsScene hover*Events to all item under mouse cursor.

    Solved
    13
    0 Votes
    13 Posts
    1k Views
    ABDUA
    @SGaist Out of curiosity, why are you making three different items for what seems to be only one in the end ? I realized that my mistake was that I was creating separate elements when only one is created in the end. Having redone this, everything worked as it should. Thank you!
  • QtRO in non-qt dynamic library

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    VoukV
    I'll wait until Win10 support is fixed and IPC works also without unix domain sockets. But besides that issues it looks promising.
  • Cannot write a data to a virtual serial port ?

    Solved qserialport cpp serialport
    16
    0 Votes
    16 Posts
    3k Views
    E
    @J-Hilk Thank you all guys for your patient and sorry for my basic mistakes :). I fixed my issue. As you said, I expect the read without writing a data to serial port.
  • 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
    307 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
    295 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
    869 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
    685 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
    582 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
    398 Views
    SGaistS
    What if you start it with QT_LOGGING_RULES="*.*=true" set ?
  • Using FreezeTableWidget in QTableWidget

    Unsolved
    2
    0 Votes
    2 Posts
    241 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.