Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • 0 Votes
    5 Posts
    3k Views
    SGaistS
    That repo might help you.
  • Automatic Handling of QGestureEvents

    Solved
    2
    0 Votes
    2 Posts
    224 Views
    SGaistS
    Hi, Yes it is correct. You are the one who knows what should happen with these gestures.
  • QImage to Qpixmap conversion is too slow

    Unsolved
    21
    0 Votes
    21 Posts
    7k Views
    SGaistS
    @lansing said in QImage to Qpixmap conversion is too slow: QImage *img= new QImage(":/cross.png"); myGLPainter->drawImage(img); That's the wrong thing to do as you will leak images doing so. Beside the initialization issue pointed by @Christian-Ehrlicher can you provide the stack trace of your crash ?
  • Qt SQL Update Parameter count mismatch while insert works

    Solved sqlite3 help
    7
    0 Votes
    7 Posts
    1k Views
    BambusFanB
    @eyllanesc Thank you very much, you are right and it works now. I thought it was a function of prepare, so it would be identical.
  • qt ui question

    Solved
    3
    0 Votes
    3 Posts
    247 Views
    JoeCFDJ
    A simple way to do it is to show or hide these widgets(1,2,3,4,5) for V click. More code will be involved if qtreeview is used.
  • Compile binary works standalone, doesn't from QtCreator (Windows API)

    Solved winapi mingw 64 bit
    10
    0 Votes
    10 Posts
    2k Views
    artwawA
    @JoeCFD No, I refuse to. I tried once, perfectly healthy code that I maintained for 3 years on MingW didn't even want to compile (it was Qt only, no external libs), I refused to waste my time on Microsoft shenanigans. Anyway, I got it to work. I was missing one thing in MinGW. For the record: to use WinAPI with MinGW (I do it via Msys2) two packages are needed (I was missing the latter): msys2-w32api-headers and msys2-w32api-runtime. .pro file in the end looks like I was expecting: LIBS += -LC:/msys64/usr/lib/w32api/ -liphlpapi LIBS += -LC:/msys64/usr/lib/w32api/ -lws2_32 INCLUDEPATH += C:/msys64/usr/include/w32api DEPENDPATH += C:/msys64/usr/lib/w32api Thank you everyone who contributed, thanks to your input I was able to trace and find my error. As always, your help is much appreciated.
  • Qt fontsize don't take in account font size from Qt Designer

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    JoeCFDJ
    check your ui_*** files to see the font settings.
  • need help on model/view

    Unsolved
    4
    0 Votes
    4 Posts
    396 Views
    D
    @django-Reinhard said in need help on model/view: .. but I've no idea, how to translate a modelindex from source model to proxy model. Ok, I found the mapping methods in AbstractProxyModel ... ... but model filtering is pretty unusable. Don't know, whether its an issue of QFileSystemModel or whether it applies to all models ... My idea was to show only directories in treeview and only files in tableview. Actually I have one QFileSystemModel and two subclasses of QSortFilterProxyModel. When I code filterAcceptsRow to accept directories only, I won't get any entry in treeview. I have to accept drives together with directories, although a drive is never shown in treeview. Same happens with filterAcceptRow for the files model. When I code filterAcceptsRow to accept anything except directories, I won't get any entry in treeview. That's some kind of ridiculous. The root entry for the table view is a directory and the tableview shall only show the children of that entry. So why must the root entry pass the filter criteria? It will never be shown, so from my point of view there's no reason at all. Very strange in deed. Lets see, what happens with self coded models ...
  • QPrintSupport - print dialog not showing in windows

    Unsolved print printsupport qtprintsupport
    6
    0 Votes
    6 Posts
    2k Views
    K
    Finally discovered the error here. Inspired here: https://forum.qt.io/topic/39319/solved-qprinterinfo-availableprinters-don-t-list-available-printers/2 the .dll file was from the previous version before upgrade and somehow didnt get upgraded along. So copying the file manually to the location instead of the previous dll version made it. Thanks for help, Kosmic
  • How to know what default font is selected

    Unsolved
    1
    0 Votes
    1 Posts
    138 Views
    No one has replied
  • QTextDocument output from the label

    Unsolved
    2
    0 Votes
    2 Posts
    164 Views
    Christian EhrlicherC
    What's wrong with QTextDocument::toHtml()?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • qlabel html format

    Unsolved
    2
    0 Votes
    2 Posts
    390 Views
    Pl45m4P
    @IknowQT said in qlabel html format: I put a table in html format on the label, but it occupies the area of pixmap above It does not, I would say. It's your scrollArea.
  • scrollarea background-color not working

    Solved
    2
    0 Votes
    2 Posts
    293 Views
    Pl45m4P
    @IknowQT Have a look here: https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qabstractscrollarea
  • How to perform action before and after user edits element in QTableView?

    Solved
    6
    0 Votes
    6 Posts
    472 Views
    eyllanescE
    @Rodrigo-B I would have to check the source code of the class but I am lazy to do so, if you want to understand the cause or check the source code or debug Qt.
  • Changes in designer behave different wit CMake vs QMake

    Unsolved
    2
    0 Votes
    2 Posts
    154 Views
    eyllanescE
    @Bert59 I do not reproduce the problem, try deleting the build folder and recompile
  • How to add observer for macOS?

    Solved
    8
    0 Votes
    8 Posts
    953 Views
    S
    @SGaist Thank you very much, it worked!
  • MacOS X BigSur: QPainter::begin: Paint device returned engine == 0, type: 2

    Unsolved
    4
    0 Votes
    4 Posts
    597 Views
    SGaistS
    https://support.apple.com/en-us/HT202043
  • How to set stylesheet for all class except QMenu?

    Unsolved
    4
    0 Votes
    4 Posts
    354 Views
    mrjjM
    @ungrown Hi Yes. using names or class types for the selector. Sadly there is no "not" outside of pseudo-states as far as I know. Sometimes you can also cheat and apply the stylesheet to MainWindow central as most widgets lives there but not the main MenuBar.
  • DB lost connection after 5 minutes aprox.

    Solved
    5
    0 Votes
    5 Posts
    374 Views
    SGaistS
    No it's not especially if you are doing them infrequently. Beware if you are using a QSqlQueryModel or one of its subclasses, you can't do that.