Skip to content
  • Migration to 6.4.1 and opengl

    Unsolved General and Desktop qt6 opengl vulkan
    6
    0 Votes
    6 Posts
    853 Views
    S
    @jsulm the only query i have is if OpenGL is still supported why am i observing kind of jagged lines when i use Opengl? Also am i setting the backend properly like i stated in my code above?
  • 0 Votes
    3 Posts
    437 Views
    J
    Ah yes, of course, thats makes a lot of sense. I'll set the item as selected, and change the way i draw a selected item to match that of a hovered item. Thank you i think i was trying to overcomplicate things.
  • QtJambi 6.7.1 available

    Language Bindings qt6 java language bindings
    1
    0 Votes
    1 Posts
    241 Views
    No one has replied
  • QChart with more than 1 AreaSeries ?

    Unsolved General and Desktop qt6 qchart qcharts areaseries chart
    1
    0 Votes
    1 Posts
    198 Views
    No one has replied
  • Multimedia Developer Expertise in Qt and GStreamer - Remote

    Unsolved Jobs jobs gstreamer qt6 multimedia
    1
    0 Votes
    1 Posts
    796 Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    A
    @cristian-adam Thanks for the explanation. Since it works well, I'll just leave it as is.
  • QtJambi 6.7.0 available

    Language Bindings java qt6 language bindings
    1
    0 Votes
    1 Posts
    320 Views
    No one has replied
  • 0 Votes
    5 Posts
    509 Views
    E
    @JonB Thanks for the explanation.
  • 0 Votes
    26 Posts
    4k Views
    A
    @jsulm it worked, thanks
  • 0 Votes
    2 Posts
    659 Views
    bibasmallB
    I have found out that this problem is mainly related to WinAPI + framelessness, not to Qt. I didn't manage to find any working WinAPI solution, for example, I've tried this one: melak47's solution. So I've chosen Qt way. This approach is not as concise as I expected from the WinAPI approach, but it works. Here is a code snippet describing only the necessary parts. .hpp class FramelessWindow : public QQuickWindow { Q_OBJECT QML_ELEMENT Q_PROPERTY(bool isMaximized READ isMaximized NOTIFY isMaximizedChanged) signals: void isMaximizedChanged(); public: FramelessWindow() noexcept; Q_INVOKABLE void showNormal() noexcept; Q_INVOKABLE void showMaximized() noexcept; bool isMaximized() const noexcept; private: bool eventFilter(QObject* watched, QEvent* event) override; bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override; QRect restoredGeometry_; bool isMaximized_; }; .cpp FramelessWindow::FramelessWindow() noexcept : isMaximized_ { false } { setFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMaximizeButtonHint); installEventFilter(this); SetWindowLongPtr((HWND)winId(), GWL_STYLE, WS_POPUP | WS_THICKFRAME | WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX); } void FramelessWindow::showNormal() noexcept { setGeometry(restoredGeometry_); isMaximized_ = false; emit isMaximizedChanged(); } void FramelessWindow::showMaximized() noexcept { restoredGeometry_ = geometry(); setGeometry(screen()->availableGeometry()); isMaximized_ = true; emit isMaximizedChanged(); } bool FramelessWindow::isMaximized() const noexcept { return isMaximized_; } bool FramelessWindow::eventFilter(QObject* watched, QEvent* event) { QPoint cursorPos = QCursor::pos(); qreal dpr = devicePixelRatio(); QRect draggingArea = geometry(); draggingArea.setHeight(32 * dpr); draggingArea.setY(draggingArea.y() + dpr * ResizeBorderWidth); if (draggingArea.contains(cursorPos)) { if (event->type() == QEvent::MouseButtonPress) { if (isMaximized_) { restoredGeometry_.moveTo({ QCursor::pos().x() - restoredGeometry_.width() / 2, QCursor::pos().y() - 10 }); showNormal(); } startSystemMove(); return true; } else if (isResizable_ && event->type() == QEvent::MouseButtonDblClick) { if (draggingArea.contains(cursorPos)) { if (isMaximized_) { showNormal(); } else { showMaximized(); } return true; } } else if (event->type() == QEvent::WindowStateChange && QWindow::visibility() == QWindow::Maximized) { setGeometry(screen()->availableGeometry()); isMaximized_ = true; emit isMaximizedChanged(); return true; } } return QQuickWindow::eventFilter(watched, event); } bool FramelessWindow::nativeEvent(const QByteArray& eventType, void* message, qintptr* result) { if (auto* msg = static_cast<MSG*>(message); msg->message == WM_NCCALCSIZE) { NCCALCSIZE_PARAMS& params = *reinterpret_cast<NCCALCSIZE_PARAMS*>(msg->lParam); if (params.rgrc[0].top != 0) { --params.rgrc[0].top; } *result = 0; return true; } return QQuickWindow::nativeEvent(eventType, message, result); }
  • 0 Votes
    19 Posts
    5k Views
    K
    Attempt # 10 for building on windows [SUCCESS!!] Started from scratch by re-downloading the source and used the subst command to make a new path to build with. Created a virtual drive to avoid the PATH length limit: subst a: .\qt-everywhere-src-6.6.2\ created the build folder and ran the configure.bat like the following: PS a:\build> ..\configure.bat Ran the command cmake --build . --parallel Ran the install command afterwards PS a:\build> cmake --build . --parallel No issues and everything was installed.
  • Converting QString to a quoted shell argument.

    Unsolved Qt 6 qt6 linux qstring
    3
    0 Votes
    3 Posts
    466 Views
    JonBJ
    @Basile_Starynkevitch I don't know what your command is or how you are presently sending it to QProcess as you do not show these. You can normally leave the correct quoting to QProcess with an argument list. If, for some reason, you have a string and want to split it into arguments for QProcess you can use QStringList QProcess::splitCommand(QStringView command). Also void QProcess::startCommand(const QString &command, QIODeviceBase::OpenMode mode = ReadWrite) presumably uses that internally. Note however that you reference https://docs.gtk.org/glib/func.shell_quote.html and that says Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean unquoted_string. Quoting to a shell like /bin/sh can have its own rules. For example, echo '$HOME' and echo "$HOME" behave differently. I don't know how/whether you deal with that. And your GLib shell_quote ignores this.
  • syntax error

    Unsolved General and Desktop qt6 c++ windows
    6
    0 Votes
    6 Posts
    754 Views
    JonBJ
    @a_coder I don't claim to understand what you are trying to achieve, but let's assume this is the way you want to go. Then I can see why the control class might need to know about the mainwindow class. But I cannot see why the latter would then need to know about the former, or what you are passing/sharing between them. If you got rid of that dependency direction you might not need your mutual references.
  • 0 Votes
    4 Posts
    1k Views
    cristian-adamC
    Qt Creator 13.0.x comes with LLVM 17. Just upgrade to https://download.qt.io/official_releases/qtcreator/13.0/
  • QtJambi 6.6.2 available

    Language Bindings java qt6 language bindings
    1
    0 Votes
    1 Posts
    342 Views
    No one has replied
  • Qt6 Windows slower than Qt6 Ubuntu

    Solved Qt 6 ubuntu windows 10 inst msvc gcc qt6
    47
    0 Votes
    47 Posts
    8k Views
    J
    @JonB Last edit my code : DataReceiver::DataReceiver(QObject *parent) : QObject{parent} { _manager.setAutoDeleteReplies(true); } void DataReceiver::start() { _connection++; if(_connection > 1) return; _takeData = true; run(); } void DataReceiver::stop() { _takeData = false; _connection = 0; _data.clear(); } void DataReceiver::getData() { _data.clear(); QString url = QString("http://localhost:%1/sample").arg(_port); QUrl _apiUrl(url); QNetworkRequest _request(_apiUrl); _reply = _manager.get(_request); connect(_reply, &QNetworkReply::readyRead, this, &DataReceiver::onReadReady); connect(_reply, &QNetworkReply::finished, this, &DataReceiver::onFinished); } void DataReceiver::run() { if(!_takeData) return; getData(); } void DataReceiver::onReadReady() { _data += _reply->readAll(); } void DataReceiver::onFinished() { emit sendData(_data); run(); } its working. time slow down from 65ms to 165ms but its working.
  • Test automation by robot framework?

    Unsolved Test Center test automation testing qt6 qml window qmlc++
    4
    0 Votes
    4 Posts
    2k Views
    Pl45m4P
    These bots... sigh
  • 0 Votes
    8 Posts
    4k Views
    MesrineM
    @lucast Thanks, indeed it aligns better with the new design. I will try to use loadFromModule API from now on According to this will improve compilation time when changing qml files, that is something I was looking for.
  • 0 Votes
    2 Posts
    448 Views
    bibasmallB
    As I understand it, the child should receive the event before the parent, but in my case, the child is deaf. I thought maybe the problem was the size of the child, so I set it equal to the parent size, but it didn't help. I can call mousePressEvent(e) directly for the child in the parent's overload, but it looks like a very bad design. UPD: currentPrimitive_->setKeepMouseGrab(true); allows to pass the event to the child without ugly direct call of mousePressEvent(e) .
  • 0 Votes
    12 Posts
    5k Views
    S
    hey that is really helpful but i want to ask can some one guide me building Quazip and Zlib by Qt creator in build Cmake i don't want to download separate Cmake and perform all these commands in it i tried to do this and i guess i was partially succesfull i got this Msg in my application output while running Zlib zlib version 1.3.1 = 0x1310, compile flags = 0x65 uncompress(): hello, hello! gzread(): hello, hello! gzgets() after gzseek: hello! inflate(): hello, hello! large_inflate(): OK after inflateSync(): hello, hello! inflate with dictionary: hello, hello! and i found these files in my build folder = libzlib.dll libzlib.dll.a and other files but when i tried to build Quazip it did not gone as planed i got so many errors so can someone pls give its answer too i really appreciate that.