Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Unable to build on windows 11 & Qt 5.12 because of linker error

    Unsolved
    3
    0 Votes
    3 Posts
    429 Views
    C
    @Christian-Ehrlicher This is the file referred to by the OP. The PRI file is used when building the examples only; the main library uses CMake. The comment that the OP omitted reads: # Note: Due to Angle, windows might use either OpenGL (desktop) or # OpenGL ES (angle) backend. Newer Qt versions don't automatically # link with OpenGL ES libraries. win32 { equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 14) { ... This might provide a reason for explicitly linking the library. Like you I imagine this needs to be provided separately. It also strikes me that the comment and the PRO file logic are opposite in regard to the Qt versions i.e., it explicitly links for older version not newer versions.
  • How to set transparency effects with setMask (or other)

    Solved
    6
    0 Votes
    6 Posts
    723 Views
    G
    @KenAppleby-0 I think I found, the main thing was to turn off these calls buried in the code recesses setAutoFillBackground( true ) And the management of the palette and the background image needs to be reviewed. But even if other things malfunction now, partial transparency works. I've made some changes, the graphic effect is better and the code is substantially definitive (if it can be useful to someone else). void Panel::paintEvent( QPaintEvent *e ) { Q_UNUSED(e); QPainter p( this ); QRect qrRect; QColor qcRectColor; qrRect = rect(); qrRect.adjust( 1, 1, -1, -1 ); qcRectColor = palette().color( QPalette::Background ); qcRectColor.setAlphaF( 0.7 ); // p.setRenderHint ( QPainter::Antialiasing ); p.setPen( palette().color( QPalette::Background ) ); p.setBrush( qcRectColor ); p.drawRoundedRect( qrRect, 45.0, 45.0); QFrame::paintEvent( e ); } [image: b7b1affb-546b-4f57-8eb2-5b6a45f68195.png]
  • Embedded Font in PDF

    Unsolved
    2
    0 Votes
    2 Posts
    458 Views
    SGaistS
    Hi and welcome to devnet, That's a pretty intriguing question. I think you should bring it to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.
  • QTimeEdit in the QTableView problem

    Solved
    5
    0 Votes
    5 Posts
    342 Views
    M
    @SGaist it works thanks a lot Miłosz
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    20 Views
  • This topic is deleted!

    Solved
    4
    0 Votes
    4 Posts
    38 Views
  • how to " break " a graph in a line?

    Unsolved qcustomplot
    3
    0 Votes
    3 Posts
    515 Views
    timob256T
    @wrosecrans #include "qcustomplot.h" // Инициализируем объект полотна для графика wGraphic = new QCustomPlot(); ui->gridLayout->addWidget(wGraphic,2,0,5,5); // и устанавливаем // Добавляем график на полотно wGraphic->addGraph(wGraphic->xAxis, wGraphic->yAxis); // Подписываем оси координат wGraphic->xAxis->setLabel("итерации"); wGraphic->yAxis->setLabel("Дб"); // Устанавливаем максимальные и минимальные значения координат wGraphic->xAxis->setRange(0,100); wGraphic->yAxis->setRange(-50,50); // Отрисовываем содержимое полотна wGraphic->replot(); // добавляем красную линию на график wGraphic->addGraph(); // red line wGraphic->graph(0)->setPen(QPen(QColor(255, 110, 40))); // чистим старое отрисовываем новое wGraphic->graph(0)->clear(); wGraphic->graph(0)->rescaleAxes(); wGraphic->graph(0)->setData(y,x); // Устанавливаем координаты точек графика wGraphic->replot(); // Отрисовываем содержимое полотна
  • UDP communication

    Solved
    22
    0 Votes
    22 Posts
    2k Views
    JonBJ
    @Vijaykarthikeyan Please now get help from other people than me. I'm done.
  • Custom Widget Plugin for QtDesigner - promote?

    Unsolved qtplugin qtdesign designer promote
    1
    0 Votes
    1 Posts
    322 Views
    No one has replied
  • This topic is deleted!

    Solved
    5
    0 Votes
    5 Posts
    37 Views
  • Collapsable menu bar moves label.

    Solved
    9
    0 Votes
    9 Posts
    964 Views
    R
    @Axel-Spoerl Thanks for the suggestion. pushButton->setStyleSheet("text-align:left;"); does fix the issue. Yes it does make sense to name it as menuButton. Initially I had a button for the menu icon and then a label separately. So I was using menuIcon for the button name which I should have changed in the new design. I thought of having application related button options on the GUI main window it self rather than on the menu bar. By collapsing the menu bar to the left, I wanted to get more space from the main dash board side. Hope this makes sense. May be I should remove the wording "Menu" to avoid confusion.
  • We need a walkthrough for setting up QtTest unit tests in Visual Studio

    Unsolved
    3
    0 Votes
    3 Posts
    591 Views
    S
    @GuitarMan said in We need a walkthrough for setting up QtTest unit tests in Visual Studio: Grrr, it shouldn't be this difficult! Qt's main advantage is to write portable software. This is why there is a focus on project configurations that are portable between platforms. VS projects isn't one of them. In my opinion, there is not good integration with VS. The best we figured out to do is to use a QMake-based project and let qmake generate a VS project file. The resulting VS project is already much better than Qt's Visual Studio plugin. CMake would be even easier to use with VS, as it would be supported natively. The best way to figure out how to add tests to a VS project is to create a dummy QMake project with one test and generate the corresponding VS project from this. Have a look at the created project file with a text editor (it is XML after all) and see if you can reproduce everything from within VS.
  • 1 Votes
    14 Posts
    2k Views
    S
    @Axel-Spoerl said in Setting a QSS style on all QToolButtons in an application except the ones inside a QToolBar: maybe try another, more positive color. Well, you might be right. The trouble started when we tried to introduce a dark theme... ;-)
  • MVD

    Unsolved
    2
    0 Votes
    2 Posts
    124 Views
    Christian EhrlicherC
    Would you please start using code tags and asking questions instead posting tons of code?
  • This topic is deleted!

    Unsolved
    11
    0 Votes
    11 Posts
    75 Views
  • How to clear plot in QCustomPlot?

    Solved qcustomplot plot vector qt5.15.2
    2
    0 Votes
    2 Posts
    762 Views
    timob256T
    @timob256 In general , there was one mistake , for some reason I thought that by setting the size of the vector , it would correct everything itself , but it turned out not to be so void MainWindow::slotProcessDatagrams() { QByteArray baDatagram_in; do { baDatagram_in.resize(m_pudp_in->pendingDatagramSize()); m_pudp_in->readDatagram(baDatagram_in.data(), baDatagram_in.size()); } while(m_pudp_in->hasPendingDatagrams()); QDataStream in(&baDatagram_in, QIODevice::ReadOnly); in.setVersion(QDataStream::Qt_5_3); in >> str_priem; // принимаем сообщение str_x = str_priem.section(' ',0,0); str_y = str_priem.section(' ',1); if(my_int >= 80) { // clear firs element // x.pop_back(); // y.pop_back(); // x.removeLast(); // y.removeLast(); x.pop_front(); //последний из вектора y.pop_front(); x << str_x.toDouble(); y << str_y.toDouble(); } else { x << str_x.toDouble(); y << str_y.toDouble(); my_int = my_int + 1; } // чистим старое отрисовываем новое wGraphic->graph(0)->clear(); wGraphic->graph(0)->rescaleAxes(); // wGraphic->replot(); // Отрисовываем содержимое полотна wGraphic->graph(0)->setData(y,x); // Устанавливаем координаты точек графика wGraphic->replot(); // Отрисовываем содержимое полотна // Очищаем принятую строку str_priem.clear(); } True, a new error jumped (for some reason the last and first point somehow connects, I don't know how to break) [image: R3rvJ.png]
  • How to create .exe file of QT project

    Unsolved designer launch executable qtcreator launchimage iconset
    13
    0 Votes
    13 Posts
    10k Views
    S
    hello man so first change ur build configuration to release or whatever then build your application and after that go to ur qt files -> bin > compiler u used > windeployqt.exe that file is what which will gather the .dll and etc files which ur app needs right click on the window and select powershell and then this command .\windeployqt.exe "path of ur .exe file"
  • Cross building on MacOS for Linux device. How?

    Unsolved
    2
    0 Votes
    2 Posts
    155 Views
    SGaistS
    Hi, One of the simplest solution is to use a virtual machine so you can develop directly on Linux and have all the tools required available.
  • QGroupBox not expanding in QTabWidget

    Unsolved
    3
    0 Votes
    3 Posts
    247 Views
    SGaistS
    Hi and welcome to devnet, Which version of Qt are you using ? On which platform ? Can you provide a minimal compilable example that shows your issue ?
  • git is not working in QT creator terminal with bash

    Unsolved
    3
    0 Votes
    3 Posts
    242 Views
    JoeCFDJ
    @srinath_ramamoorthy try to use the full path bash -c "/usr/bin/git describe --tags --abbrev=8 --dirty --always --match """