Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
82.7k Topics 452.5k Posts
  • How to catch Ctrl+C on a widget?

    12
    0 Votes
    12 Posts
    22k Views
    I

    Maybe it's because the toolbar of the software has shortcuts like ‘ctrl+c,ctrl+e’ or something like that, where you need to press ctrl+c first and then press other keys to make it work.

  • hints in .ui files?

    Unsolved
    6
    0 Votes
    6 Posts
    212 Views
    T

    Ah, thanks @Bonnie! That tool I didn't know yet. Thanks to @JonB too!

  • 0 Votes
    1 Posts
    69 Views
    No one has replied
  • 0 Votes
    5 Posts
    196 Views
    JoeCFDJ

    @haowong What @ChrisW67 pointed out is you are using Qt5 and Qt6 at the same time. Simply use Qt5 or Qt6, but not both.

  • Click event for QListWidgetItem

    Solved
    13
    0 Votes
    13 Posts
    415 Views
    S

    @shreya_agrawal

    It worked by installing the event filter on the table view of the calendar widget:

    ui->dateEdit->calendarWidget()->findChild<QTableView*>("qt_calendar_calendarview")->viewport()

  • how to change the color of title bar in mdi window

    Unsolved
    6
    0 Votes
    6 Posts
    3k Views
    IPlayGenji6I

    I don't know why

    QMdiSubWindow:title { background-color: green; }

    removes the icon.

    But this works perfectly.
    @Kogotoro said in how to change the color of title bar in mdi window:

    QMdiSubWindow{ selection-background-color: grey;/*for some styles it also used as title bar main gradient color...*/ }
  • Why is using EGL in Qt so hard?

    Unsolved
    6
    0 Votes
    6 Posts
    463 Views
    L

    I am try to render video too,i use egl can success show the key is GL_TEXTURE_EXTERNAL_OES

  • QOpenGLWidget And EGL Shrare Contex

    Unsolved
    1
    0 Votes
    1 Posts
    55 Views
    No one has replied
  • 0 Votes
    3 Posts
    120 Views
    franco.amatoF

    Yes, it cannot be part of the layout of the main window area because the widget I have to render on top of it is semi translucent and the widgets below should be visible at the same time. Also the main window' widgets can not be moved when the game widget is shown. I don't use a stacked widget because the size between the game widget and the main window central widget is much different. That's why I render it on top of the main window and I manually resize it

  • 0 Votes
    5 Posts
    186 Views
    S

    Ah, got it. This is caused by the KDE Breeze style as compared to the Fusion/Windows/etc. style. Fixed it by force-setting the style to Universal.

  • Cannot load TLS backend in Qt 6.8.1

    Unsolved
    7
    0 Votes
    7 Posts
    322 Views
    SGaistS

    Start your application with the QT_DEBUG_PLUGINS environment variable set to one to see if you get information about what is happening.

  • MacOS system tray issue

    Unsolved
    5
    0 Votes
    5 Posts
    391 Views
    L

    Hi, I have the same problem, have you solved it?

  • Happy Holiday

    Solved
    6
    1 Votes
    6 Posts
    232 Views
    Axel SpoerlA

    And to you, too!

  • Setup.exe Entry Point Not Found

    Unsolved
    2
    0 Votes
    2 Posts
    137 Views
    SGaistS

    Hi and welcome to devnet,

    I would start by searching which application gets automatically started.
    There's likely something messing up your within your PATH.

  • 0 Votes
    9 Posts
    443 Views
    F

    @SGaist I reread and reinterpreted the quoted statement in your post and finally got it why Qt::WA_TransparentForMouseEvents does not work for widget Y as I expected. The key part is "as if the widget and its children were not present in the widget hierarchy", so if Y is not present, then widget X will get a mouse event, which is not transparent, so mouse event won't go through X. Thanks.

  • are there only five kinds of layouts in Qt?

    Solved
    4
    0 Votes
    4 Posts
    222 Views
    Pl45m4P

    @markleo said in are there only five kinds of layouts in Qt?:

    Or are there only five kinds of layouts in Qt?

    Yes and no.
    In most cases these are the base layouts used. However there are also custom layouts with "special" behavior, like
    FlowLayout from the Flow Layout Example.
    That being said, you can combine the basic layout or build your own layout, if you really need something different (what you cannot reproduce using the five above).

  • [SOLVED] Variable arguments

    13
    0 Votes
    13 Posts
    13k Views
    crimson1023C

    You can refer to this code.

    void my_printf(const char *format, ...) { va_list args; va_start(args, format); for (const char *p = format; *p != '\0'; p++) { if (*p == '%') { p++; // Move past '%' switch (*p) { case 'd': { // Handle integer int i = va_arg(args, int); printf("%d", i); break; } case 'c': { // Handle char char c = (char)va_arg(args, int); // char is promoted to int putchar(c); break; } case 's': { // Handle string char *s = va_arg(args, char *); printf("%s", s); break; } default: // Handle unknown format specifiers putchar('%'); putchar(*p); break; } } else { putchar(*p); // Print regular character } } va_end(args); }
  • How to unclick a QPushButton

    Solved
    7
    0 Votes
    7 Posts
    229 Views
    Pl45m4P

    The dialog literally says "Press ESC to cancel" :)

  • 0 Votes
    4 Posts
    211 Views
    JonBJ

    @markleo
    No, it will be far more expedient to use a Python debugger and its watch windows.

    Otherwise write whatever you want to display whichever variables however you want to see them from your program.

  • Modern titlebars in Qt widget based desktop applications

    Unsolved
    5
    0 Votes
    5 Posts
    323 Views
    S

    Sorry, I shared the incorrect blog post, I wanted to share this instead https://www.qt.io/blog/custom-window-decorations, though it doesn't solve much.