Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 456.7k Posts
  • How to prevent a QIcon from getting highlighted?

    Unsolved
    10
    0 Votes
    10 Posts
    745 Views
    V
    QIcon icon(":/path_to_icon"); icon.addFile(":/path_to_icon", {}, QIcon::Selected); listItem->setIcon(icon); Tested on qt 5.15 in QListWidget.
  • Frequency of MouseMoveEvents lower with Qt 6

    Unsolved mousemoveevent qt6 performance
    5
    0 Votes
    5 Posts
    571 Views
    letsfindawayL
    @Pl45m4 Here is a short video of the application showing the issue: https://github.com/letsfindaway/OpenBoard/issues/203#issuecomment-2595705681 The rubber is a pixmap cursor using QCursor. The circle is repositioned at each mouseMoveEvent. You see that it is lagging behind the cursor. The preview image to the left is the second view attached to the same scene. So you see, nothing complicated. And as I already said in the beginning: when I run the same program using Qt5, then the lag is much smaller, because the repetition rate of the mouseMoveEvents is higher. I have setMouseTracking(true), so that I get the events even when the mouse button is not pressed. And no, there are no further actions connected to the movement as long as the mouse button is not pressed.
  • QHeaderView: Stretch *and* ResizeToContents?

    Solved
    8
    0 Votes
    8 Posts
    4k Views
    KaguroK
    Hi! Is there any better solution for this problem, or still is this the best way?
  • Resize handles not visible in QDockWidget

    Unsolved
    8
    0 Votes
    8 Posts
    514 Views
    SGaistS
    Then there's the good old: comment out everything and add things back until it breaks.
  • Issue with building Qt 5.15.16 for UWP arm

    Solved
    9
    0 Votes
    9 Posts
    646 Views
    Cobra91151C
    Hello! I removed the jom from PATH environment variable to use nmake to get the proper error message. I get the following issue: Running configuration tests... Checking for valid makespec... + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LFLAGS += /ENTRY:main" -early "CONFIG += cross_compile" C:/QtBuild/qt-everywhere-src-5.15.16/qtbase/config.tests/verifyspec + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && set MAKEFLAGS=& nmake > Microsoft (R) Program Maintenance Utility Version 14.29.30158.0 > Copyright (C) Microsoft Corporation. All rights reserved. > cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DARM -D__ARM__ -D__arm__ -DNDEBUG -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\config.tests\verifyspec -I. -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\winrt-arm-msvc2019 -Fo @C:\Users\cobra\AppData\Local\Temp\nm3D22.tmp > verifyspec.cpp > link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:ARM /NODEFAULTLIB:kernel32.lib /ENTRY:main /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:verifyspec.exe @C:\Users\cobra\AppData\Local\Temp\nm3D71.tmp > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib' > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\ARM\link.EXE"' : return code '0x49d' > Stop. ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken. C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild> The problem was with > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib'. I found out that this issue is causing the latest Windows SDK - 10.0.26100.0: https://discussions.unity.com/t/info-link-fatal-error-lnk1181-cannot-open-input-file-ucrt-lib-hololens-2-build-issue/950584/3 So, I used the following Windows SDK: 10.0.22621.0 and run: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" 10.0.22621.0 Now, it completed the configuration and I successfully built Qt 5.15.16 for winrt-arm-msvc2019 architecture. This issue is resolved. Thanks.
  • Installing Qt5 on the latest online installer

    Solved
    17
    1 Votes
    17 Posts
    2k Views
    B
    @jsulm okay thanks I tried it and it worked. qt-online-installer-windows-x64-4.8.1.exe --mirror http://qt.mirror.constant.com
  • 0 Votes
    2 Posts
    145 Views
    enjoysmathE
    I think I've got it, I look at the parent container's arrows (BigCat's arrows). Anything connected to the nodes I'm moving might trigger updates (in the case of setPos). This is a nice way, because I can be sure I have everything and it's iterative / without signals/slots. For the child added / removed it's the same principal.
  • How to pack QGridLayout

    Solved
    3
    0 Votes
    3 Posts
    303 Views
    A
    ok, I kinda get it now. I can just add spacers left and right and set fixed widths to get what I wanted. Namely, 8 80x80 pixel tiles packed together and centered along the middle of the 1600px width which is the middle of the 2 videos. [image: a76c4b24-f511-4a8e-af73-7c00637a78be.png] this gets me what I wanted: category_label = QLabel("Ball Flight\nDetails") category_label.setFixedSize(200, 80) category_label.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter) category_label.setStyleSheet("font-weight: bold;") self.infoGrid.addWidget(category_label, 0, 0, 1, 1) categories = ["Club\nSpeed", "Attack\nAngle", "Spin\nRate", "Carry\nDistance", "Club\nPath", "Face\nto Path", "Side\nSpin", "Back\nSpin"] values = [128, 15, 3000, 250, 270, 30, 200, 2500] hSpace = QWidget(); hSpace.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.infoGrid.addWidget(hSpace, 0, 1) row = 0 for i in range(len(categories)): col=i+2 print(f"Adding content at {row},{col}") tile_widget = QWidget() tile_widget.setFixedSize(80, 80) tile_layout = QVBoxLayout(tile_widget) tile_layout.setContentsMargins(0,0,0,0) tile_layout.setSpacing(0) name_label = QLabel(categories[i]) name_label.setAlignment(Qt.AlignmentFlag.AlignCenter| Qt.AlignmentFlag.AlignBottom) name_label.setStyleSheet("font-weight: bold; color: black;") value_label = QLabel(str(values[i])) value_label.setAlignment(Qt.AlignmentFlag.AlignCenter| Qt.AlignmentFlag.AlignTop) value_label.setStyleSheet("font-weight: bold; font-size: 24px; color: white;") tile_layout.addWidget(name_label) tile_layout.addWidget(value_label) tile_widget.setStyleSheet("border: 1px solid lightblue; background-color: lightblue; border-radius: 10px;") self.infoGrid.addWidget(tile_widget, 0, col, alignment=Qt.AlignmentFlag.AlignHCenter|Qt.AlignmentFlag.AlignVCenter) hSpace = QWidget(); hSpace.setFixedWidth(470) hSpace.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.infoGrid.addWidget(hSpace, 0, 10)
  • QIFW maintenancetool uninstall not working from Windows Settings

    Unsolved
    4
    0 Votes
    4 Posts
    370 Views
    G
    https://bugreports.qt.io/browse/QTIFW-3330
  • QGraphicsScene Composition modes

    Solved qt c++ compositionmode qpainter
    3
    0 Votes
    3 Posts
    339 Views
    S
    @Pl45m4 Yeah forgot to set opacity to something else than 1, that solved it...
  • Qt6.8.1 Windows 32 bit with msvc143

    Unsolved
    8
    0 Votes
    8 Posts
    786 Views
    B
    @Qt6User I think qml need qtdeclarative and translations/phrasebooks need qttranslations. The submodules are those "qtxxxxx" subfolders in the source folder. You can also open the .gitmodules file to check.
  • QWindows static linking (Qt Plugin)

    Unsolved
    1
    0 Votes
    1 Posts
    97 Views
    No one has replied
  • Issue with showMaximized() and resize() for Fullscreen on Linux

    Unsolved
    3
    0 Votes
    3 Posts
    227 Views
    A
    @JonB Thank you very much for your answer. I tried your answer and it worked.
  • This topic is deleted!

    2
    0 Votes
    2 Posts
    9 Views
  • no menu Qt 6.8.1 on mac

    Solved
    8
    0 Votes
    8 Posts
    542 Views
    jsulmJ
    @Alan-Miller https://doc.qt.io/qt-6/qcoreapplication.html#applicationName-prop
  • QML hot reload in nvim

    Unsolved
    1
    0 Votes
    1 Posts
    92 Views
    No one has replied
  • 0 Votes
    1 Posts
    89 Views
    No one has replied
  • QVideoWidget::setBrightness missing in Qt 6.8

    Unsolved
    3
    0 Votes
    3 Posts
    222 Views
    M
    @Pl45m4 said in QVideoWidget::setBrightness missing in Qt 6.8: @mcallegari79 Have a look here: https://doc.qt.io/qt-6/qtmultimedia-changes-qt6.html It doesn't say anything about changes on QVideoWidget. Plus, the mediaplayer example screenshot in Qt 6.8.1 has not been updated even though they removed the color options button: https://github.com/qt/qtmultimedia/blob/dev/examples/multimedia/player/doc/images/mediaplayerex.jpg I really hoped Qt6 would finally sort out the QtMultimedia mess, but I see it's still one step forward and two steps backward. So sad.
  • Qt components display opaque background on MFC

    Unsolved
    2
    0 Votes
    2 Posts
    175 Views
    A
    [image: f49795cb-4cec-4121-8cce-bb4479915258.png]
  • QWebView sample code (widgets only, no QML) ?

    Solved
    3
    0 Votes
    3 Posts
    211 Views
    B
    You mean QWebView from QtWebKit? It has been deprecated since Qt5.5 and removed since Qt5.6. So the recent Qt releases won't have the library package and the examples. You can find the old examples repository here: https://code.qt.io/cgit/qt/qtwebkit-examples.git/ QtWebKit is replaced by QtWebEngine now.