Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8958 cannot add spaces to arguments of slots in slots definitions in designer
  3. QTBUG-9441

cannot use "unsigned int" as argument of slots in slots definitions in designer

    XMLWordPrintable

Details

    Description

      For the specific example of "const QString &" described in QTBUG-8958 (see parent task) I think it is clear. Thank you for the explanation.

      But ... I'm terribly sorry, but I think it is still needed to enable typing spaces in designer in the dialog described in QTBUG-8958 or else in some cases this dialog will limit the use of the designer for some users.

      (BTW: is there any way to re-open a bug, which would be better than adding sub-task?).

      ==========================

      Imagine a situation where

      • you have a custom widget (as a plugin in designer) with a signal
        	void signalValue(unsigned int);
        
      • you cannot change this signal (say, plugin is proprietary or because of some other reason you don't have the source code) or do not want to change this signal (say, overall the plugin is too complex and changing signal's signature would involve too much time spent on praying that such change won't break something else...);

      Now, you are creating a new class which inherits from QDialog

      • you want to create form for this class in designer
      • you want to use the above-mentioned signal of the above-mentioned plugin widget
      • and you want this signal to be connected to a slot in your class via designer.

      In declaration of your QDialog-inheriting class you add a slot

      	void slotNewValue(unsigned int);
      

      and you can perfectly well connect it to signal "signalValue(unsigned int)" of the plugin widget in the code, but ... it is not possible in designer because you cannot add "slotNewValue(unsigned int)" in the dialog mentioned in QTBUG-8958, because you cannot type a space there!

      ==================
      Again: I can change the slot in any way I want, but I cannot modify the signal . The signal emits "unsigned int". It seems that because of this "you can't type spaces" rule you simply cannot connect in designer. It's limiting for users of designer, and it is so for no good reason.

      The same problem will be there with any of the few types which identifiers contain space (well, "long long" is not a formally legal type in c++, is it? but still in practice you can use it with most common compilers - that is you can use it everywhere except for adding and connecting slots in designer ... )

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            wiecko Marek Wieckowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes