Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.2k Posts
  • How to display an icon on the top-left corner of a window, using CMake?

    Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    B
    @Bonnie Thank you so much for the clarification. It helps a lot. This finally makes sense to me now. I will spend some time to learn more about .rc files and to create one, as well as to manually add an icon to the executable. I will be back onto this forum once I have made some progress. It may take me a while though, as I am just a part-time hobbyist in Qt programming. Thanks again!
  • QPainterPath::addRoundedRect with 4 different radii?

    Solved
    4
    0 Votes
    4 Posts
    814 Views
    A
    const int w = width(); const int h = height(); auto drawRoundedRect = [this, w, h](QPainterPath &p, const BorderRadius &r, int inset) { // clang-format off p.arcMoveTo( inset, inset, inset, r.topLeft, 0); p.arcTo(inset, inset, r.topLeft, r.topLeft, 180, -90); p.arcTo(w - r.topRight - inset, inset, r.topRight, r.topRight, 90, -90); p.arcTo(w - r.bottomRight - inset, h - r.bottomRight - inset, r.bottomRight, r.bottomRight, 0, -90); p.arcTo(inset, h - r.bottomLeft - inset, r.bottomLeft, r.bottomLeft, 270, -90); p.arcTo(inset, inset, r.topLeft, r.topLeft, 180, 0); // clang-format on }; Where should this code be placed? How should it be used?
  • Struggle to insert a QListWidgetItem at his old position ...

    Unsolved
    7
    0 Votes
    7 Posts
    446 Views
    JonBJ
    @ademmler said in Struggle to insert a QListWidgetItem at his old position ...: @ChrisW67: I want to move the taken item back to its old position. Isn't "from" the old position? Does the position be changed while "dragging" or afterwards? I would guess it only changes after the drag/drop. But in any case these two lines QListWidgetItem* myItem = ui->listWidget->takeItem(from); ui->listWidget->insertItem(from, myItem); take an item out at from and immediately put it back in at from so that's just a NOOP.
  • Qt 5 - qnetwork schannel with non-exportable private key.

    Unsolved
    5
    0 Votes
    5 Posts
    508 Views
    S
    https://bugreports.qt.io/browse/QTBUG-131483
  • Problems using QML Virtual Keyboard with QtWidgets

    Unsolved
    2
    0 Votes
    2 Posts
    242 Views
    G
    Hi Nic, Have you find any solution? I'm facing similar situation as yours. After keyboard popping up and taking the focus, the QLineEdit box loses focus and dismisses the keyboard immediately. Really weired.
  • QMessageBox not centered on application

    Solved
    15
    0 Votes
    15 Posts
    1k Views
    JonBJ
    @Perdrix Then you may fare better with Wayland than I did, if you have to use it!
  • 0 Votes
    5 Posts
    363 Views
    F
    @jsulm Thank your reply,I have solved my question,thank you very much!kiss kiss!
  • A question about QEventLoop.

    Unsolved
    2
    0 Votes
    2 Posts
    227 Views
    I
    @John-Van said in A question about QEventLoop.: But as expected, the eventloop of 0 should be the first to end, so the 0 end should be printed first. That is simply not possible. Only the inner most event loop is processing events, and it does so for the entire thread. So only event loop 4 is active, the rest are blocked. Event loop 0 is indeed the first one to have its quit slot called, but that only signals for it to end at the first available opportunity- which isn't right now, as it is blocked on executing loop 1, which is blocked on executing loop 2, etc. It can exit only once all of that unwinds, so last.
  • create plugin to add functionnality in QtDesign Studio

    Solved
    6
    0 Votes
    6 Posts
    587 Views
    S
    Thanks, i did understand how it works and i manage to compile a plugin without getting source from QtDesignStudio. I changed the versions number in C:\Qt\Tools\QtCreator\lib\cmake\QtCreator\QtCreatorIDEBranding.cmake to be the version of QtDesignerStudio and it works (Qt version for my plugin and Qt version of QtDesignStudio is the same). My plugin does compile and is loaded in QtDesignStudio and show a new menu :) Thanks for the help
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    23 Views
    No one has replied
  • Maintenance Tool not signed correctly for MacOS Sequoia

    Solved macos installer maintenancetool
    5
    0 Votes
    5 Posts
    1k Views
    SGaistS
    Nice ! Thanks for the feedback :-)
  • Qt6Widgetsd.lib dooesn't exist

    Unsolved
    6
    0 Votes
    6 Posts
    777 Views
    jsulmJ
    @Karsten-Heimrich said in Qt6Widgetsd.lib dooesn't exist: qmake version found in D:\Qt\Tools\QtDesignStudio\qt6_design_studio_reduced_version\bin This is wrong. You need to select qmake from Qt version you installed. Did you install any Qt version?
  • QScrollArea size is the same with is child widget but it display scroller bar.

    Solved
    7
    0 Votes
    7 Posts
    506 Views
    J
    @Pl45m4 Hi, I use below code to adjust widget size and the scroll bar is hide.Thank you very much. QSize sizeTemp = viewport()->size(); testWidget->resize(sizeTemp);
  • QGraphicsTextItem * and void * conversion error

    Unsolved
    14
    0 Votes
    14 Posts
    1k Views
    K
    Thank you all for your help. Based on your analysis, here is my solution, Create section auto pTextItem=new QGraphicsTextItem("QGraphicsTextItem",pV); auto id=reinterpret_cast<void*>(dynamic_cast<QGraphicsItem*>(pTextItem)); deletion void DeleteGraphics(void* id) { if (id==nullptr) return; auto scene=m_pQGraphicsView->scene(); auto items=scene->items(); QGraphicsItem* item = static_cast<QGraphicsItem*>(id); if(items.contains(item)){ scene->removeItem(item); delete item; } }
  • advanced docking system - close tab button highlighted

    Unsolved
    2
    0 Votes
    2 Posts
    226 Views
    S
    You might want to post this question to Qt advanced docking systems github
  • Inconsistent borders when drawing a custom translucent widget using QPainterPath

    Unsolved
    1
    0 Votes
    1 Posts
    126 Views
    No one has replied
  • QTabWidget - unable to load multiple documents in multiple tabs

    Solved
    11
    0 Votes
    11 Posts
    686 Views
    Pl45m4P
    @JonB said in QTabWidget - unable to load multiple documents in multiple tabs: In case that made a difference In case @blossomsg forgot to implement some function which is needed for QPdfView or so... Like Q[...]Model derived class without implementing setData Good that it works now
  • Is it possible to sync. selection of 2 GraphicScenes while keeping mutliselection ?

    Solved
    5
    0 Votes
    5 Posts
    388 Views
    JonBJ
    @Gilboonet Oh, OK.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Compiling for macOS - what compilers are supported please?

    Unsolved
    5
    0 Votes
    5 Posts
    602 Views
    SGaistS
    Hi, Non Apple clang is officially unsupported territory. It's also untested. Xcode is the IDE/Suite of tools but the compiler is clang for quite some time now.