Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Qt Native Stye for macOS

    Solved
    3
    0 Votes
    3 Posts
    564 Views
    J
    @SGaist Thanks for the answer. In Qt 6.5, it finally support native macOS message box!
  • White screen on launching application on SurfacePro

    Unsolved
    5
    0 Votes
    5 Posts
    499 Views
    M
    @Abderrahmene_Rayene yes i have looked and found this thread https://forum.qt.io/topic/52625/qopenglshaderprogram-could-not-create-shader-program/8?_=1681473494310 As mentioned in this thread i am planning to check use DirectX via ANGLE but i am not sure if this will work QCoreApplication::setAttribute( Qt::AA_UseOpenGLES ); do you have any better suggestion than this please let me know
  • QStateMachine: How To Implement Logical OR Between States

    Unsolved
    1
    0 Votes
    1 Posts
    297 Views
    No one has replied
  • 0 Votes
    3 Posts
    691 Views
    A
    @SGaist Hey thank you, I removed the QObject heredity for every class since I don't need ^^ I made every copy constructor and operator= overload not usable (= delete) I made for each a static clone() method which makes a deep copy CueTrack * CueTrack::clone(CueTrack *other) { if(!other) return nullptr; CueTrack * trackToReturn = new CueTrack(); if(other->_animationsList) { delete trackToReturn->_animationsList; trackToReturn->_animationsList = AnimationsSubTrack::clone(other->_animationsList); } QVectorIterator<FxSubTrack*> it(other->_fxList); while (it.hasNext()) { auto p = it.next(); FxSubTrack * fx = FxSubTrack::clone(p); trackToReturn->appendFx(fx); } if(other->_zoneChase) trackToReturn->_zoneChase = ZoneChaseSubTrack::clone(other->_zoneChase); return trackToReturn; }
  • QComboBox - few questions

    Unsolved
    3
    0 Votes
    3 Posts
    234 Views
    Axel SpoerlA
    ...and for the records: It's all nicely written down here.
  • Memory leak in QAbstractSocketPrivate::readFromSocket() ?

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    Axel SpoerlA
    @Alexey-Volkov thanks for letting us know what it was. Glad that it works. Please don’t forget to mark the issue solved.
  • QScrollBar slider shadow

    Unsolved qscrollbar shadow qt5.9.0
    1
    0 Votes
    1 Posts
    282 Views
    No one has replied
  • Updating Qt Line Series in Real-Time is not working

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    X
    The real-Time Plot not working is already resolved above, and the blank chart area can be resolved by adding the following line. chartView->setMinimumSize( ui->frame->size() );
  • Simple Line Series Plot not Filling the Centeral Widget?

    Solved
    3
    0 Votes
    3 Posts
    324 Views
    X
    @JoeCFD said in Simple Line Series Plot not Filling the Centeral Widget?: @xpress_embedo said in Simple Line Series Plot not Filling the Centeral Widget?: chartView can you try to set size policy of frame to ? setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); you may set the same thing to chartView Thanks @JoeCFD for your suggestion. Unfortunately it didn't worked, I added the following lines of code. ui->frame->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); chartView->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); Later, I did the following changes and now the plot is okay. chartView->setMinimumSize( ui->frame->size() ); For me this is working, thanks for your support, and let me know if you or someone else has some suggestions for me.
  • How to save the widgets load using UiLoader?

    Unsolved
    2
    0 Votes
    2 Posts
    193 Views
    JonBJ
    @Kattia C++ being a compiled language you cannot do this, you cannot create variables at runtime, depending on what is in a file. (Python could, but not C++.) To get variables at runtime that is why you run uic on the .ui file at build time. Which produces a ui_...h file defining the class for ui with individually named variables for each widget. No more findChild<>() calls. So why are you loading the .ui file via UiLoader::load() dynamically at runtime instead of letting it get processed via uic at compile-time?
  • QMediaRecorder - How to access encoded data

    Unsolved
    1
    0 Votes
    1 Posts
    150 Views
    No one has replied
  • QWidget don't change color theme on macOS under specific circumstance

    Unsolved
    3
    0 Votes
    3 Posts
    211 Views
    S
    @SGaist There're another 2 necessary factors beside stylesheet: QScrollArea & QGridLayout. And another observation: go through it: print widget and window palette's rgb, delay printing to 3s later, and switch appearance; you will find that widget palette's RGB hasn't changed, but window palette's has.
  • 0 Votes
    2 Posts
    445 Views
    Christian EhrlicherC
    @Txai said in Possible virus threat on \Qt\6.5.0\mingw_64\bin \Qt63DRender.debug: Suggestion? Report to your antivirus tool and/or update your signatures. Don't know what Qt can do against a false positive.
  • Qt build file not being updated

    Unsolved
    6
    1 Votes
    6 Posts
    1k Views
    mzimmersM
    I notice you're not using a shadow build -- I'd encourage you to start doing so. Also, on Windows, you might get this error if an instance of the application is already running (or hasn't fully shut down). Somewhere in Creator there's an option to ensure that a running program is quit before a new build/run is attempted.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • htons

    Unsolved htons function
    3
    0 Votes
    3 Posts
    263 Views
    M
    @syrine https://doc.qt.io/qt-6/qtendian.html
  • How to sort item names in treeview alphabetically ignorent of the case?

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    M
    Here is the code change that fixed the crash: void RegistryItemDelegate::initStyleOption(QStyleOptionViewItem *inOption, const QModelIndex &inIndex) const { QStyledItemDelegate::initStyleOption(inOption, inIndex); //const Node *node = mModel->node(inIndex); const Node* node = nullptr; //code change start QModelIndex sourceIndex = inIndex; auto proxyModel = dynamic_cast<const QAbstractProxyModel*>(sourceIndex.model()); //We map the index back to its source as many times as needed. //We expect to do it once for now but that may change in the future. while (proxyModel) { sourceIndex = proxyModel->mapToSource(sourceIndex); proxyModel = dynamic_cast<const QAbstractProxyModel*>(sourceIndex.model()); } auto regModel = dynamic_cast<const RegistryItemModel*>(sourceIndex.model()) ; if (regModel) node = regModel->node(sourceIndex); //code change end if(node == NULL) return; if(!node->isDefault()) inOption->palette.setColor(QPalette::Text, mModifiedColor); if(node->nodeType() == eRegDir && inOption->version == 4) { ((QStyleOptionViewItemV4*)inOption)->features |= QStyleOptionViewItemV2::HasDecoration; ((QStyleOptionViewItemV4*)inOption)->icon = mFolderIcon; } }
  • Good books on Qt

    Unsolved
    4
    0 Votes
    4 Posts
    668 Views
    PerdrixP
    @SGaist I did - on the basis on that I bought a copy of Hands-On High Performance Programming with Qt 5, and by comparison with the ones I mentioned, it is frankly quite poor. Which is why I asked for recommendations for books that were up to the same standard as the two I mentioned. D.
  • GPL and .ui file

    Solved licensing gpl
    2
    0 Votes
    2 Posts
    407 Views
    SGaistS
    Hi, You can add: <author> SPDX-FileCopyrightText: Copyright (c) year name_of_copyright_holder email_of_copyright_holder SPDX-License-Identifier: GPL-3.0-or-later </author> Note that this is not specific to GPL. Whatever license you use, you shall make it known. There are several possible ways to do it. I would recommend following the SPDX format. It's simple to manage and you can use the reuse tool to help you ensure you have all what is needed in your software sources.