Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Include openssl source in qt project

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    M
    @Kent-Dorfman In Qt 5.12.4 is openssl 1.1.1 included. Do you know, how I use this version or compile the libs?
  • This topic is deleted!

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

    Solved
    3
    0 Votes
    3 Posts
    42 Views
  • QButtonGroup for custom buttons

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    mrjjM
    Hi Well its a bit odd as normally the options is just not there is not right classes/types so since it allows it, one should think it should work. Give it some hours and see if someone has an idea. I know writing a small sample is a bit hard as its a plugin. Im trying to find some other Designer button i could try with and see if it generally do not work or there could be something in the plugins XML or similar that needs filling out.
  • PPTP connectivity problem

    Unsolved
    5
    0 Votes
    5 Posts
    416 Views
    Pablo J. RoginaP
    @Grand-Williamson and how this issue is related to Qt framework?
  • Qmake TEMPLATE variable manipulation via command line interface

    Solved
    2
    0 Votes
    2 Posts
    375 Views
    sierdzioS
    @Patrick-Fromberg said in Qmake TEMPLATE variable manipulation via command line interface: Why is TEMPLATE += or TEMPLATE-= not a syntax error then? Those are operators on list variables. Most probably because nobody bothered to make it into an error. What effect can any variable change have after processing is complete? After parsing sounds better? I guess that is what they have meant. The documentation of the cli option -tp explains that this will add a prefix to the TEMPLATE variable. The documentation of the TEMPLATE variable does not say anything about a prefix. What would prefix.lib as TEMPLATE value mean? Just like the other option, will this be "after processing"? This is used on Windows to generate Visual Studio stuff, I think. More info https://stackoverflow.com/questions/1043294/qt-qmake-tp-vc-to-create-visual-studio-project-files Will qmake command line options applied to a subdirs project also recurse to the child projects? Yes, as far as I remember. Just try it out ;-)
  • Name an unknown number of widgets with a name followed by an integer

    Unsolved
    14
    0 Votes
    14 Posts
    1k Views
    N
    OK, thank you for the answer
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Problem with styling undetermined QProgressBar

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    TobiasT
    I found the solution: https://doc.qt.io/qt-5/stylesheet-customizing.html#box-model The bug in the current code was that that we tried to use margins instead of borders. m_pProgressBar->setStyleSheet(QString::fromUtf8(R"( QProgressBar { border-image: url(:/images/launcher/ProgressBar_BG.png); font-family: "Verdana"; font-size: 13px; font-weight: bold; color: #bfbfbf; text-align: center; border-top: 2px; border-left: 2px; border-bottom: 3px; border-right: 3px; } QProgressBar::chunk { border-image: url(:/images/launcher/ProgressBar.png); } )")); Setting the borders correct in the Style and not using margins in the ```Style::chunk```` solved the problem.
  • Add maximize button to QDialog frame

    Solved
    6
    0 Votes
    6 Posts
    7k Views
    R
    Thanks to all ... I have decided to remain with QDialog because it has so many convenient signals and slots. In the constructor, I can resize the window using QScreen, e.g.: // Set the window to fill the available desktop area, // but leave a little space to allow for resizing the dialog: QScreen *screen = QGuiApplication::primaryScreen(); if (screen) { QRect r = screen->availableGeometry(); int l,t,w,h; l = t = 10; w = r.width() - 2*l; h = r.height() - 2*t; this->setGeometry(l,t,w,h); } Also, it was necessary to set the sizePolicy of the dialog to Ignored in order to allow the user to resize it without it jumping back to the default dimensions. So I am now marking this as "Solved".
  • Shortcut of QKeySequence::FullScreen ?

    Solved
    5
    0 Votes
    5 Posts
    969 Views
    Pl45m4P
    @sonichy Which version of Deepin? According to Deepin Wiki, F11 should work (as it seems to be the standard key for displaying a fullscreen window). https://wiki.deepin.org/wiki/Deepin_Terminal#Display_Window_in_Fullscreen (Dont know if this is for terminal window only). Deepin (15.X.X) is Debian-based (Desktop Environment even based on Qt), as written here (https://en.wikipedia.org/wiki/Deepin), so it's probably the same as on Debian (F11)..
  • QIntValidator for fixed value

    Unsolved
    5
    0 Votes
    5 Posts
    521 Views
    A
    @Kerndog73 oh means entirely writing a seperate class for this purpose
  • index out of range

    Solved
    20
    0 Votes
    20 Posts
    3k Views
    ODБOïO
    hi @mrjj said in index out of range: or items.at(x) sorry i said i never do this calls,but in the lib itself there is that call. Just after closing the file writePath() is called: void RenderItemList::writePath(QPainter& painter, bool updatedFromFile) { QPainterPath path; ItemToBase *item = list.at(0); // << crash here item->setParams(scale, windowSize.height(), offsetx, offsety); erros # else RaiseFailFastException(nullptr, nullptr, 0); # endif qt_message_fatal(QtFatalMsg, context, message); { Q_ASSERT_X(i >= 0 && i < p.size(), "QList<T>::at", "index out of range"); i saw ind debug mod that list was empty .. i initialised it after reading the file, now everything works correctly. thank you for help
  • How to show the long text on a label that just show the latest part.

    Unsolved
    8
    0 Votes
    8 Posts
    956 Views
    MihanM
    @Kent-Dorfman Yep, running on ARM. BTW, could you tell me how to make a LineEdit's text cursor always is visible. I found something in source code , if (QApplication::keypadNavigationEnabled()) { if (e->type() == QEvent::EnterEditFocus) { end(false); d->setCursorVisible(true); d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime()); } else if (e->type() == QEvent::LeaveEditFocus) { d->setCursorVisible(false); d->control->setCursorBlinkPeriod(0); if (d->control->hasAcceptableInput() || d->control->fixup()) emit editingFinished(); } } it's in QLineEdit's event(), so how can I use this setCursorVisible(bool) ?
  • Updating QAbstractTableModel

    Solved
    3
    0 Votes
    3 Posts
    439 Views
    A
    Bingo!!!
  • Qimagereader and cliprect example

    Unsolved
    7
    0 Votes
    7 Posts
    859 Views
    B
    @mrjj thanks.
  • QTableView scrolling gets stuck (touch screen / grab gesture)

    Solved
    2
    0 Votes
    2 Posts
    729 Views
    S
    Subclassed QGestureRecognizer and created own custom solution. It's little bit ugly, but working. Waiting for bug fix.
  • ROI of a scaled image to ROI of actual high resolution image

    Unsolved
    3
    0 Votes
    3 Posts
    419 Views
    B
    @jsulm ok thank you for the answer. Let me check. once again thanks
  • QML animations on low power Intel APU (Cherry Trail) low fps

    Unsolved
    3
    0 Votes
    3 Posts
    363 Views
    jsulmJ
    @pablomuniz Can you show your code? Maybe something can be optimised, but without the code is impossible to say.
  • What type of value does function connect return?

    Solved
    6
    0 Votes
    6 Posts
    3k Views
    Chris KawaC
    You can wrap it in your own thing that happily converts to and from a connection and make the bool operator always return true: class MyConnection { public: MyConnection(const QMetaObject::Connection& c) : conn(c) {} MyConnection& operator=(QMetaObject::Connection& c) { conn = c; return *this; } operator QMetaObject::Connection() const { return conn; } operator bool() const { return true; } private: QMetaObject::Connection conn; }; If it's just for testing then you could typedef it, something like: #ifdef TESTING using ConnType = MyConnection; #else using ConnType = QMetaObject::Connection; #endif and use it like this: ConnType conn = connect(...); Q_ASSERT(conn); // always true in testing, can fail otherwise but I kinda agree with @VRonin that it makes little sense.