Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Select an element on a QPushButton click

    Solved
    3
    0 Votes
    3 Posts
    281 Views
    S
    Hi @JonB, yes, that worked perfectly. Thanks for solving this :D
  • ui_*.h files are not generated

    6
    0 Votes
    6 Posts
    3k Views
    R
    @jozef-rusin How you resolved this error. I am gettting same like fatal error C1083: Cannot open include file: 'ui_qrichbutton.h': No such file or directory
  • Animating SVG widget

    Solved
    2
    0 Votes
    2 Posts
    206 Views
    SPlattenS
    Done it, and it works, in the SVG resource I set the opacity to 0, then in this modification I change the opacity to 1: double dblOpacity = 1.0; QDomElement elRoot(mpdocRxIcon->firstChildElement()); QDomNodeList lstNodes(elRoot.elementsByTagName(TraineeMonitor::mscszTagStop)); bool blnAssign(false); for( int i=0; i<lstNodes.size(); i++ ) { QDomNode ndStop(lstNodes.at(i)); if ( !ndStop.isElement() ) { continue; } QDomElement elm(ndStop.toElement()); QString strID(elm.attribute(TraineeMonitor::mscszAttrID)); if ( strID.compare(TraineeMonitor::mscszLEDcolor) == 0 ) { QString strStyle(elm.attribute(TraineeMonitor::mscszAttrStyle)); QStringList slstStyles(strStyle.split(TraineeMonitor::mscszStyleDelimiter)); uint uintIdx = 0; foreach( QString strStyle, slstStyles ) { QStringList slstStyle(strStyle.split(TraineeMonitor::mscszAttrDelimiter)); strStyle = slstStyle[0]; if ( strStyle.compare(TraineeMonitor::mscszStyleStopOpacity) == 0 ) { slstStyles[uintIdx] = strStyle + TraineeMonitor::mscszAttrDelimiter + QString::number(dblOpacity); blnAssign = true; break; } uintIdx++; } if ( blnAssign == true ) { QString strNewStyle; foreach( QString strStyle, slstStyles ) { if ( strNewStyle.isEmpty() != true ) { strNewStyle += TraineeMonitor::mscszStyleDelimiter; } strNewStyle += strStyle; } elm.setAttribute(TraineeMonitor::mscszAttrStyle, strNewStyle); break; } } } if ( blnAssign == true ) { mpsvgRxIcon->load(mpdocRxIcon->toByteArray()); } The final version will have a QTimer that increments the sets the opacity to 1 then decrements to 0 to fade out.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • Qt app build from cmd-line as a .bat file

    Solved
    3
    0 Votes
    3 Posts
    731 Views
    S
    @sierdzio Thanks for the quick answer!!!
  • Is there example for keyframe animation open source app ?

    Unsolved
    2
    0 Votes
    2 Posts
    219 Views
    SGaistS
    Hi, Maybe KDE's Kdenlive couldn't help.
  • moc: standard input:0: Note: No relevant classes found. No output generated.

    Unsolved
    7
    0 Votes
    7 Posts
    762 Views
    KH-219DesignK
    My first instinct was to scrutinize the main of moc itself, but I'm not seeing too many clues: https://github.com/qt/qtbase/blob/d32f7dde257f6d/src/tools/moc/main.cpp#L573 My other thought is the infamous "MAX_PATH" limit of 260 char on windows: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file Over the years, I have ended up pinning a handful of bizarre and silent failures on the MAX_PATH issue. This should be considered as a candidate diagnosis if the longest path in the project repository reaches 260 char, but should also be considered even if the project paths (from project root) are themselves short, but the absolute path where the project is checked out (or where the build outputs are placed) consists of a long path.
  • spanish characters from html plain text to QTextEdit widget

    Unsolved
    2
    0 Votes
    2 Posts
    224 Views
    jsulmJ
    @U7Development said in spanish characters from html plain text to QTextEdit widget: I think i need to import as UTF8 Unicode or something like that Yes, you need to store the text as Unicode (for example UTF-8) and also read it as unicode. So, how do you write the text into a file and how do you read it back?
  • Best way to have multiple pyqt GUIs? First page determines inputs of second page?

    Unsolved
    5
    0 Votes
    5 Posts
    989 Views
    mrjjM
    @poordev123 Its actually the same widget :) Its perfect for designs with multiple pages, but only one visible at a time.
  • QLegendMarker signal/slot connect not working

    Solved
    4
    0 Votes
    4 Posts
    467 Views
    D
    Yes, I added QChartView::mousePressEvent(event) (and the other two) at the end of the respective overriden functions and it works now.
  • master/detail - miss some feature

    Unsolved
    1
    0 Votes
    1 Posts
    100 Views
    No one has replied
  • Convert unsigned char to QString

    Unsolved
    9
    0 Votes
    9 Posts
    3k Views
    JonBJ
    @aftershocker1 My friend, you really need to sort your understanding of bytes, strings & numbers out! :) why would data = 248 No! data is set to "248", a string, not a number. Look at https://doc.qt.io/qt-5/qbytearray.html#number Returns a byte array containing the string equivalent of the number n to base base (10 by default). So the string is 3 characters, and the hex string representation of those 3 bytes is "323438". You want something more like: QByteArray data(buf, sizeOfBuffer); // wrap buffer (or some section of it) in a `QByteArray` QString data_as_hex_string = data.mid(9, 2).toHex(); // pick out bytes [9,10] for conversion to hex
  • writeCharacteristic L2CP write request incomplete

    Unsolved
    1
    0 Votes
    1 Posts
    163 Views
    No one has replied
  • 0 Votes
    6 Posts
    1k Views
    Q
    I have already solved this problem, in fact, just call the function to capture the image twice to solve the problem, because the first time only has the background image, the second time is the required image!!
  • QTextImageFormat widget->grab() not working

    Solved
    6
    0 Votes
    6 Posts
    484 Views
    eyllanescE
    @IknowQT Always apply recommendation 1 and 3 not only for this forum but for your daily work since you will save time and others as well.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QTextCharFormat setfont not working

    Solved
    5
    0 Votes
    5 Posts
    418 Views
    I
    @eyllanesc https://forum.qt.io/topic/130298/qtextimageformat-widget-grab-not-working Can you look at the content?
  • stylesheet QSlider with QPushButtons

    Unsolved
    3
    0 Votes
    3 Posts
    293 Views
    D
    @SGaist ok thanks, its bad) don't want write subclass
  • 0 Votes
    2 Posts
    181 Views
    SGaistS
    Hi and welcome to devnet, linuxdeployqt is an independent project, you should contact its authors. That said, can you post the exact command you used to create your application deployment ? What does ldd "your_application" returns on both systems ?
  • Valgrind Memory Leak on QThread::exec()

    Solved
    6
    0 Votes
    6 Posts
    923 Views
    N
    @JoeCFD Thanks that was I was thinking. Just wanted to check if there was something obvious I was doing wrong.