Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
82.7k Topics 452.2k Posts
  • QWindows static linking (Qt Plugin)

    Unsolved
    1
    0 Votes
    1 Posts
    51 Views
    No one has replied
  • 0 Votes
    3 Posts
    80 Views
    A

    @JonB Thank you very much for your answer. I tried your answer and it worked.

  • This topic is deleted!

    2
    0 Votes
    2 Posts
    9 Views
  • no menu Qt 6.8.1 on mac

    Solved
    8
    0 Votes
    8 Posts
    194 Views
    jsulmJ

    @Alan-Miller https://doc.qt.io/qt-6/qcoreapplication.html#applicationName-prop

  • QML hot reload in nvim

    Unsolved
    1
    0 Votes
    1 Posts
    36 Views
    No one has replied
  • 0 Votes
    1 Posts
    44 Views
    No one has replied
  • QVideoWidget::setBrightness missing in Qt 6.8

    Unsolved
    3
    0 Votes
    3 Posts
    75 Views
    M

    @Pl45m4 said in QVideoWidget::setBrightness missing in Qt 6.8:

    @mcallegari79

    Have a look here:

    https://doc.qt.io/qt-6/qtmultimedia-changes-qt6.html

    It doesn't say anything about changes on QVideoWidget.
    Plus, the mediaplayer example screenshot in Qt 6.8.1 has not been updated even though they removed the color options button:
    https://github.com/qt/qtmultimedia/blob/dev/examples/multimedia/player/doc/images/mediaplayerex.jpg

    I really hoped Qt6 would finally sort out the QtMultimedia mess, but I see it's still one step forward and two steps backward.
    So sad.

  • 1 Votes
    23 Posts
    11k Views
    J

    @saurabhjadhav1911 It works for me!!! Thanks a lot

  • Qt components display opaque background on MFC

    Unsolved
    2
    0 Votes
    2 Posts
    66 Views
    A

    QQ图片20250113141152.png

  • QWebView sample code (widgets only, no QML) ?

    Solved
    3
    0 Votes
    3 Posts
    73 Views
    B

    You mean QWebView from QtWebKit?
    It has been deprecated since Qt5.5 and removed since Qt5.6. So the recent Qt releases won't have the library package and the examples.
    You can find the old examples repository here: https://code.qt.io/cgit/qt/qtwebkit-examples.git/
    QtWebKit is replaced by QtWebEngine now.

  • How to convert Jalali date to Gregorian date

    Solved
    7
    0 Votes
    7 Posts
    222 Views
    SavizS

    @hskoglund this did indeed work. and the results are correct:

    "2025/01/04"

    Thank you for your help.

    Here is the code if anyone is curious:

    void jalaliToGregorian(int year, int month, int day) { QCalendar calendar(QCalendar::System::Jalali); QDate gregorianDate = calendar.dateFromParts(year, month, day); qDebug() << QString("%1/%2/%3") .arg(gregorianDate.year(), 4, 10, QChar('0')) .arg(gregorianDate.month(), 2, 10, QChar('0')) .arg(gregorianDate.day(), 2, 10, QChar('0')); }
  • How to set icon image for my Qt App

    Unsolved
    4
    0 Votes
    4 Posts
    183 Views
    Christian EhrlicherC

    @JacobNovitsky said in How to set icon image for my Qt App:

    Thanks for answer, but I dont use QML

    Why do you write you use a QWindow then?

    with opened QWindow or the same

    When you use a QWidget, see the documentation: https://doc.qt.io/qt-6/qwidget.html#windowIcon-prop

  • How to run code before Vulkan surface destruction

    Unsolved
    1
    0 Votes
    1 Posts
    34 Views
    No one has replied
  • MacOS file system icons have changed

    Solved
    11
    0 Votes
    11 Posts
    384 Views
    G

    Noticed this on Windows. Is there a way to switch between native icons and those custom? They suit nice on dark theme with Fusion style.

  • 0 Votes
    13 Posts
    371 Views
    JonBJ

    @Christian-Ehrlicher
    Yes. And my point is that was done via previously making that the current row via the code above at https://forum.qt.io/post/818550. Which is also used for coloring the selected row. And they both get passed an opt.rect for fillrect(). So presumably the rect for the selection is wider than the rect for his cursor row to produce the result. But why are they different widths or cover different cells?

  • 0 Votes
    3 Posts
    74 Views
    enjoysmathE

    I know what is going on now. And I remember this from old code. I am updating the arrows instead of simply moving them by a delta whenever things are selected and drag moved. The arrows don't need to be updated there. Also, visually this causes shaking arrows when you move a bunch of things. They should move rigidly.

  • 0 Votes
    7 Posts
    230 Views
    Pl45m4P

    @Deckhead said in What's the correct way to setup the following project with a Model/View/Delegate structure?:

    I deleted it because there was no value in the replies for someone else who came searching for answers.

    Strange attitude...

    Usually these threads evolve over time and by the information you provide... deleting the question right away because the first two answers or so are that exactly what you are looking for is weird but ok.
    Also why do you care about future readers?! You started the topic because you needed help?!
    Good luck with that

  • Qt with Realm-CPP DB. How?

    Unsolved
    7
    0 Votes
    7 Posts
    194 Views
    JonBJ

    From my limited understanding and reading

    Realm-CPP is just C++ code and you can integrate/call it like anything else C++ from Qt. BUT Realm-CPP DB --- as written in your title but not in your question --- is some kind of database which is supposed to be "like SQLite".

    If it is the DB/database side you want to use then if you want it to work with Qt QSql... classes you will have to use or produce a driver for it, like QSQLITE or QMYSQL. If you only wish to make explicit calls to whatever its C++ interface is, not via QSql.... classes, then you can do that as plain C++ code.

  • Spell checking for QLineEdit – Is it possible?

    Unsolved
    7
    0 Votes
    7 Posts
    174 Views
    P

    Thank you, guys, for your responses and the references you provided! I appreciate that there are some ready solutions. I will check them out to adapt them to my case.

  • QSvgRenderer using an external CSS file

    Unsolved
    10
    0 Votes
    10 Posts
    323 Views
    JonBJ

    @KSierens
    But that is true for all CSS on any HTML element: any property set explicitly on any element overrides any rule in CSS, which is only used for defaults if nothing explicitly, and always has been like that.

    Full CSS in HTML allows you to use the !important directive in a CSS rule (stroke: red !important;) and that would actually override even matching style explicitly placed on an element. But Qt's CSS is a subset of full CSS and does not support !important, so you can't do that.