Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Remove libwayland dependency on project

    Solved
    6
    1 Votes
    6 Posts
    786 Views
    W
    Ok. Yes, compiling QT5 on my own without wayland would be a solution, although a bit inconvinient one. Nevertheless, I will try it! Thank you all!
  • Getting colors from stylesheet in code

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    D
    I might dig into the Qt source and see if there is some way to hack it to the surface via subclassing. I'll post here if I actually figure out a way to do it.
  • QMediaPlayer without pulse audio

    Unsolved
    1
    0 Votes
    1 Posts
    238 Views
    No one has replied
  • Unable to find .exe file in my project

    Unsolved
    10
    0 Votes
    10 Posts
    787 Views
    A
    @Wasee try to build your program with tool-chain of your another linux system. or Cross compile your program according to another linux system architecture
  • Qt Unit test in a project

    Solved
    31
    1 Votes
    31 Posts
    16k Views
    H
    @jsulm how can I link the qml file to the Qt Quick test project. I tried with same way as I link cpp file earlier, but its not working.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • Arabic string displaying on QLabel and QPushtbuon is different in Qt

    Unsolved
    2
    0 Votes
    2 Posts
    205 Views
    JonBJ
    @Jared-Zhou I don't know how it works/what you can do about it, but just to say I assume this is to do with RTL reading/display of the Arabic string, and it somehow being detected as containing some non-Arabic characters and (unfortunate) different handling between QLabel versus QPushButton. I assume if you replace that QTE. with some Arabic characters they both display the same, correct way.
  • QMdiSubWindow in MdiArea is empty

    Solved
    4
    0 Votes
    4 Posts
    514 Views
    JonBJ
    @RetroZelda I don't know why you have a problem, but since you say "so its solved as far as im concerned" I won't spend further time investigating. But I do just want to say this is not an issue to do with Qt Creator/Designer. That simply ends up generating C++ code (when uic is run during build) which calls Qt libraries to do the work.
  • How to do this using QPainter?

    Solved
    2
    0 Votes
    2 Posts
    276 Views
    M
    Hi, You can substract two paths: int radius=100; QPainterPath path; path.addEllipse(rect().center(),radius,radius); QPainterPath recPath; int recW=radius/2; QRectF rec=path.boundingRect(); rec.setSize(QSize(recW,recW)); rec.translate(0,radius-recW/2); recPath.addRect(rec); path=path.subtracted(recPath); // substract rect from ellipse painter.fillPath(path,Qt::red);
  • QDoubleSpinBox - blockSignals() does not work

    Solved
    16
    0 Votes
    16 Posts
    2k Views
    D
    @J-Hilk I had the time now to try out your example. It works indeed as expected. There must be something in my code that prevents the application from working as expected, perhaps a side effect of something that I have not found yet. I will further investigate. Ralf
  • Change cursor does not work when move mouse from outside of QWidget

    Unsolved
    2
    0 Votes
    2 Posts
    510 Views
    JonBJ
    @pengxu I would look at reimplementing your Widgets hover events, mousemove events, enter/leaveEvents or even event/eventFilter to set your cursor, if you are finding provlems with what you have now. For hover events, at least, you could also implement your desired cursor via stylesheet, which may work better than what you have now in code.
  • This topic is deleted!

    Unsolved
    4
    0 Votes
    4 Posts
    17 Views
  • Animating specific controls

    Unsolved
    2
    0 Votes
    2 Posts
    207 Views
    jsulmJ
    @IknowQT You can anymate any properties of a widget (like size) without custom classes using https://doc.qt.io/qt-5/animation-overview.html. In that link you can even see some examples. What exactly do you want to animate?
  • Connecting to Database in Qt

    Solved
    18
    0 Votes
    18 Posts
    3k Views
    jsulmJ
    @Swati777999 said in Connecting to Database in Qt: I didn't get your point clearly We are talking about absolute C++ basics now! Please learn those! bool DbManager::addEntry(const QString &name) { ... QSqlQueryModel model; ... } In the code above "model" only exists inside DbManager::addEntry. As soon as DbManager::addEntry is done "mode" goes out of scope and is deleted! Also, I see that you do "return success;" before you create your model - how can this work at all?!
  • Error console error

    Unsolved
    2
    0 Votes
    2 Posts
    217 Views
    AxelViennaA
    What you could do is to show more of your code / .pro file. A guess in the dark is to add QT+=network to your .pro file.
  • main.cpp Vs mainwindow.cpp

    Solved
    11
    0 Votes
    11 Posts
    4k Views
    jsulmJ
    @Swati777999 said in main.cpp Vs mainwindow.cpp: As it is not mentioned which sections of these codes will go to which files; MainWindow.cpp, main.cpp, or mainwindow.h , it creates trouble for beginners There are tons of example Qt applications linked in Qt documentation. You should really take a look...
  • How to get FileSaveDialog with QPrintDialog?

    Solved
    5
    0 Votes
    5 Posts
    485 Views
    D
    @ChrisW67, yes, now I get that file save dialog. I also get this message in Qt Creator output Invalid parameter passed to C runtime function.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Problem while trying to build fritzing

    Unsolved
    4
    0 Votes
    4 Posts
    865 Views
    Christian EhrlicherC
    @GRS26 said in Problem while trying to build fritzing: or maybe is a linking problem As I said - you need Qt 5.14 or higher since - as you can see when you follow my the link in my first post - the used enum is only available in Qt 5.14 and up. Or ask the developer of your app you're trying to compile to add support for your ancient Qt version.
  • Role of .setHostName() while Connecting to DataBase in Qt

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    SGaistS
    Hi, One side note: unless you try to open your database on a read-only filesystem where the file does not exist, you won't have any error. This comes from SQLite, if the database file does not exist, it's created.