Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
82.7k Topics 452.1k Posts
  • 0 Votes
    67 Posts
    2k Views
    V

    Thank you!

  • 0 Votes
    1 Posts
    32 Views
    No one has replied
  • 0 Votes
    3 Posts
    104 Views
    L

    @Pl45m4 older versions do support GCC 4, for example
    https://wiki.qt.io/Qt_5.10_Tools_and_Versions
    and
    https://wiki.qt.io/Qt_5.7_Tools_and_Versions

    I have 2 problems with the documentation.

    It does not mention the buildroot toolchain It is not clear which is the last version that is ok to use GCC 4 (4.8)
  • 0 Votes
    3 Posts
    90 Views
    Christian EhrlicherC

    ... or check inside the delegate functions if the row is still the one e.g. by checking the data to display.

  • Qt WebEngine still unsupported on Windows for ARM on 6.8+

    Unsolved
    7
    0 Votes
    7 Posts
    442 Views
    B

    @fundamentalcupcake thanks for that. did you manage to get a crosscompile going by applying that patch? this is on my list of things.

  • Dock window scroll bar activate without clicking

    Unsolved
    6
    0 Votes
    6 Posts
    152 Views
    K

    @SarahBeth , What you did then? It was kept as limitation only or has some work around?

  • Undefined Reference Linker Error

    Solved
    6
    0 Votes
    6 Posts
    151 Views
    C

    Any descriptive name that is not explicitly reserved should be fair. So defaultColors or _defaultColors would be OK; _DefaultColors or __defaultColors would not.

    File-scoped variables can be declared static and become invisible outside the translation unit. Standard advice is to question the need for such variables and use an anonymous namespace instead of static:

    namespace { QList<QColor> defaultColors { Qt::blue, Qt::red, Qt::yellow, Qt::green, Qt::magenta, Qt::black, Qt::darkGray }; }; // rest of file can see defaultColors

    If your file-local color list is being populated in the constructor of a class then that strongly suggests it should be part of the class or initialised outside the class (as above).

    __rtrnClr in GetSeriesColor seems to have no need to exist.
    Are you sure the function needs a non-const reference return value and not just a QColor?

  • Cannot close application

    Unsolved
    4
    0 Votes
    4 Posts
    145 Views
    GaoboG

    the qt's document say that:

    If the event loop is not running, this function does nothing.

  • 0 Votes
    7 Posts
    2k Views
    A

    I'm having this same issue. I get the same $$magic$$ error as well. I tried passing a .stl hint to assimp importer, but that didn't work either.
    I have a lot of stl files included using qresources, so it would be a pain to migrate away, but it is feasible. I was using Qt3D before, but am trying to get away from it since it's being deprecated. Hoping someone here has some hints.

    const auto qrc = QResource{filePath.string().c_str()}; auto qfile = QFile{qrc.fileName()}; qfile.open(QIODeviceBase::OpenModeFlag::ReadOnly); auto data = std::vector<char>{}; data.resize(qfile.size()); qfile.read(data.data(), data.size()); const auto ret = importer.ReadFileFromMemory( reinterpret_cast<const void*>(data.data()), static_cast<std::size_t>(data.size()), aiProcess_Triangulate | aiProcess_JoinIdenticalVertices | aiProcess_FlipUVs); qWarning() << importer.GetErrorString(); return ret;
  • Using poppler-qt6 for qt project on macOS

    Unsolved
    7
    0 Votes
    7 Posts
    230 Views
    SGaistS

    Then it's a good first step so you will get these extra find modules for cmake which contains one for poppler.

    Otherwise, use CMake's find_library and find_path functions.

  • 0 Votes
    9 Posts
    225 Views
    JoeCFDJ

    @Leyu the Linux framebuffer platform doesn't natively support window decorations such as title bars. I guess it is not hard to create your own titlebar.

  • Is this how QSpinBox is supposed to look now, or a bug?

    Solved
    5
    0 Votes
    5 Posts
    135 Views
    V

    Awesome, that did it, thank you!

  • 0 Votes
    9 Posts
    186 Views
    Pl45m4P

    @tankist

    You could split your whole app into two components. One non GUI or non Qt background/ console program and one Qt GUI part which is responsible for the system tray menu.

  • Capturing mouseEvents

    Unsolved
    6
    0 Votes
    6 Posts
    125 Views
    jsulmJ

    @gabello306 said in Capturing mouseEvents:

    Any ideas?

    Maybe because you've overridden the mousePressEvent?
    Do you call inherited mousePressEvent in your mousePressEvent?

  • QPdfWriter and Qpainter Position

    Solved
    5
    0 Votes
    5 Posts
    149 Views
    J

    @Bonnie thanks a lot It is indeed a 12.5-fold relationship.

  • 0 Votes
    7 Posts
    137 Views
    S

    The QWindow::activeChanged signal allows me to call the delegate function when the window is actually activated.

  • 0 Votes
    5 Posts
    182 Views
    SGaistS

    What exactly did you download ? "Some zip file somewhere on GitHub" does not telle what you got.

    Based on the error message you don't have the full sources. If you want them you better download them from the official archives.

  • 0 Votes
    7 Posts
    162 Views
    SGaistS

    Hi,

    Beside what my fellows correctly pointed (nothing widgets related should be put into a model and QWidget is the base class for anything widget), you seem to need a custom vizualization of your data. If that is indeed the case, then the correct class to check is QStyledItemDelegate.

    That said, you still haven't really explained your goal and what exactly you want to show.

    It really seems that you want your text to be shown in the center of a cell which really does not require all the complexity you are describing.

  • How to install Qt5.15. x on a Mac with Apple chips

    Unsolved
    2
    0 Votes
    2 Posts
    93 Views
    SGaistS

    Hi,

    You might want to compile it yourself. 5.15.2 is x86_64 only so while it can work thanks to Rosetta you'll have trouble with external librairies.

  • How to prevent a QIcon from getting highlighted?

    Unsolved
    10
    0 Votes
    10 Posts
    522 Views
    V
    QIcon icon(":/path_to_icon"); icon.addFile(":/path_to_icon", {}, QIcon::Selected); listItem->setIcon(icon);

    Tested on qt 5.15 in QListWidget.