Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Best approach to handle cell properties with model

    Solved
    3
    0 Votes
    3 Posts
    284 Views
    M
    @sierdzio said in Best approach to handle cell properties with model: Yep, you can keep that metatada internally, no need for hidden columns. Exactly how you do it will depend on your requirements (if this operation is cheap, you can put the parsing in your model's data() method, if it takes time it will be better to do it once at startup, and store the results in some helper data structure). Got it! Thanks!
  • can't read values from QOpenGLFramebuffer 2nd color attachment

    Solved qopenglframebuf opengl fbo
    2
    0 Votes
    2 Posts
    611 Views
    S
    I did in fact have to call glDrawBuffers myself. I assumed this was handled by the FBO binding, but apparently not. QOpenGLExtraFunctions* f = QOpenGLContext::currentContext()->extraFunctions(); GLenum bufs[2] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }; f->glDrawBuffers(2, bufs); This seems strange to me that the FBO abstraction supports color attachments, but requires extra functions to use them.
  • I want to move form(QWidget) by holding it from anywhere in the other form. How?

    Unsolved
    2
    0 Votes
    2 Posts
    272 Views
    jsulmJ
    @mduzoylum Overwrite https://doc.qt.io/qt-5/qwidget.html#mousePressEvent and https://doc.qt.io/qt-5/qwidget.html#mouseMoveEvent events In mousePressEvent you store the mouse cursor position inside the widget. In mouseMoveEvent you check whether left mouse button in pressed, if it is you move the widget to have the mouse cursor at the same position in the widget as it was in mousePressEvent
  • Application Compilation Issue usingQt 5.9.1 on Windows 10 with mingw32 compiler

    Unsolved
    4
    0 Votes
    4 Posts
    366 Views
    Christian EhrlicherC
    Make sure the correct gcc is picked up. Maybe there is an old one somewhere around in your PATH. Also you don't need to update to 5.12 but maybe try the latest 5.9 one.
  • How to create mulitple database connections for a shared cache memory SqliteDB in Qt?

    Unsolved
    2
    0 Votes
    2 Posts
    350 Views
    H
    I got it, 1 setConnectOptions("QSQLITE_OPEN_URI;QSQLITE_ENABLE_SHARED_CACHE") ; 2 setDatabaseName("file::memory:"); 3 QSqlDatabase::cloneDatabase
  • Licensing, clarification?

    Unsolved
    15
    0 Votes
    15 Posts
    2k Views
    JKSHJ
    @VRonin said in Licensing, clarification?: unfortunately Qt removed the helpful comparison table between (L)GPL and commercial they had on their website. You can see an archived copy at https://web.archive.org/web/20190825123222/https://www.qt.io/download
  • How to set QCoreApplication organization name and domain correctly on macOS?

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    R
    @mpergand The thing is that whether in sandbox or not, app learns about appropriate paths available for writing using system calls (like NSLibraryDirectory). I'm only trying to learn if it's possible to achieve this with Qt.
  • Does QPrint assume page oriented printing?

    Solved
    3
    0 Votes
    3 Posts
    235 Views
    fcarneyF
    @SGaist said in Does QPrint assume page oriented printing?: shouldn't rather talk to that printer directly Yeah, I looked over the Qt Printer objects and it does seem to assume page oriented printing. I briefly thought about creating a QPrintEngine just for this printer, but the reuse of the code would not be very good. I talked to another dev and we came to the same conclusion that we should just send it directly. We have done this in the past. I think I found the network port needed to do this and will figure out what it needs. Maybe I will do a stream interface. Thanks for the feedback!
  • Confusion about extesions in my project

    Solved
    3
    0 Votes
    3 Posts
    206 Views
    B
    @SGaist Thank you!
  • Create folders in my project

    Unsolved
    8
    0 Votes
    8 Posts
    840 Views
    B
    @AnneRanch Thanks for your reply. I thought I could add a new folder, but I realized that I had to do what you mentioned or create a folder in File Manager and then add it to the project.
  • How to deploy the windows app with virtual keyboard and customize the language ?

    Unsolved
    2
    0 Votes
    2 Posts
    295 Views
    SGaistS
    Hi and welcome to devnet, One thing to fix in your command: the qmldir option should point to the folder of your application QML files.
  • QT_4 CMAKELists and Visual Studio

    Unsolved
    6
    0 Votes
    6 Posts
    308 Views
    SGaistS
    If you are thinking about the one where you actually write the code in, then yes you have to like shown in the documentation I linked to.
  • 0 Votes
    2 Posts
    566 Views
    SGaistS
    Hi, Usually you don't store the reply but rather connect its signals to lambdas, do the processing there and then call deleteLater on it once you are done.
  • Colormanagement

    Unsolved
    3
    0 Votes
    3 Posts
    234 Views
    ademmlerA
    Hi, ok thx for answering.
  • Request for debugger

    Unsolved
    8
    0 Votes
    8 Posts
    600 Views
    JonBJ
    I don't use/have access to Qt Creator; (I can't really search because the hits are all about designing toolbars in Creator, not Creator's toolbar.) Doesn't it allow you to re-arrange buttons on its toolbars and move/create toolbars? Visual Studio, and "decent" apps like IDEs at least on Windows, allow you to do that. That would be a shame if missing. Does Creator use Qt toolbars (QToolBar)? Could someone write an add-in to allow toolbar editing, which could be used in Qt Creator and/or end-user apps? :)
  • Using Qt Test and private members

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    AslundA
    @jsulm Hey Jsulm Thank you for clearing it up. Makes sense now. I missed the fact that QSqlDatabase is a singleton. Rereading the documentation I can also see the following statement. Warning: It is highly recommended that you do not keep a copy of the QSqlDatabase around as a member of a class, as this will prevent the instance from being correctly cleaned up on shutdown. If you need to access an existing QSqlDatabase, it should be accessed with database(). If you chose to have a QSqlDatabase member variable, this needs to be deleted before the QCoreApplication instance is deleted, otherwise it may lead to undefined behavior.
  • Reading XML file

    Solved
    16
    0 Votes
    16 Posts
    3k Views
    R
    Thanks for your feedback @JonB , @jsulm
  • Connect SIGNAL from object to Lambda in main(). How?

    Solved
    4
    0 Votes
    4 Posts
    4k Views
    B
    Issue closed.
  • Bluetooth LE performance in different platforms

    Solved bluetooth low e ibeacon
    3
    0 Votes
    3 Posts
    1k Views
    R
    Thank you very much for your reply. @sierdzio said in Bluetooth LE performance in different platforms: Is the simulated beacon paired in Windows Bluetooth settings? Without it, Qt will not detect it! (this will be fixed in Qt 5.14 I think)., Unfortunately, Windows does not allow me to pair the simulated iBeacon since it does not appear in the available Bluetooth devices list from the control panel. @sierdzio said in Bluetooth LE performance in different platforms: Also, make sure you're using the newest Windows version with all updates. Unfortunately, Bluetooth support on Windows is quite bad, has memory leaks etc. In early Windows 10 builds it was barely working at all. Sure, it is the latest Windows version with all updates. I was also trying to compile the Qt 5.15 source available in the repo to enable the win32 Bluetooth API to see if it makes any difference but I wasn't able to compile it... But this was just a curiosity. For me it's OK to consider Windows as the least compatible platform for the moment. About Android, I was able to tune the application and now it can properly detect the simulated iBeacon. I was using the Bluetooth LE scanner example but I hadn't checked the manifest file so that was probably the issue.
  • QStandardItemModel setItem crash..

    Solved
    3
    0 Votes
    3 Posts
    433 Views
    Christian EhrlicherC
    @TheCipo76 said in QStandardItemModel setItem crash..: OverwriteModel *model = new OverwriteModel(40,6,this); You create a local variable here...